Summary: | org.kde.pim.imapresource: Failed to create folder on server: "Create failed, server replied: ... NO Mailbox already exists ... [ ALREADYEXISTS ]" | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Dennis Schridde <heri+kde> |
Component: | IMAP resource | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 5.14.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/pim/kimap/commit/ee2900e3539483b6f3d5eadfcf8cfc9c6ed42abe | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | kimap-20.04.2-create-alreadyexists-is-not-an-error.patch |
Description
Dennis Schridde
2020-06-29 21:14:50 UTC
P.S. Expected behaviour on code-level: When the error is ALREADYEXISTS, Akonadi should consider the creation of the mailbox successful and continue the sync, i.e. mailbox creation should be idempotent. Created attachment 129920 [details] kimap-20.04.2-create-alreadyexists-is-not-an-error.patch Attached patch fixes the issue in in KIMAP 20.04.2 by making CREATE and DELETE idempotent. If CREATE fails with an ALREADYEXISTS response code, that is not an error since the intended result (the object existing at the target location) has been achieved. Likewise, if DELETE fails with an NONEXISTENT response code, that is not an error since the intended result (the object being gone from the target location) has been achieved. Please note that for RENAME response code ALREADYEXISTS *is* an error since the content of the source folder was not moved as intended. cf. https://tools.ietf.org/html/rfc5530#section-3 Please create a merge request: https://invent.kde.org/pim/kimap (In reply to Christophe Giboudeaux from comment #3) > Please create a merge request: https://invent.kde.org/pim/kimap https://invent.kde.org/pim/kimap/-/merge_requests/3 Git commit ee2900e3539483b6f3d5eadfcf8cfc9c6ed42abe by Daniel Vrátil, on behalf of Dennis Schridde. Committed on 07/07/2020 at 17:49. Pushed by dvratil into branch 'master'. Idempotent CREATE and DELETE If CREATE fails with an ALREADYEXISTS response code, that is not an error since the intended result (the object existing at the target location) has been achieved. Likewise, if DELETE fails with an NONEXISTENT response code, that is not an error since the intended result (the object being gone from the target location) has been achieved. Please note that for RENAME response code ALREADYEXISTS *is* an error since the content of the source folder was not moved as intended. cf. https://tools.ietf.org/html/rfc5530#section-3 M +27 -0 src/createjob.cpp M +1 -0 src/createjob.h M +27 -0 src/deletejob.cpp M +1 -0 src/deletejob.h https://invent.kde.org/pim/kimap/commit/ee2900e3539483b6f3d5eadfcf8cfc9c6ed42abe Git commit ce0e9873d3a897fee7fd9f8f7649ef4abd3c4627 by Christian Mollekopf, on behalf of Dennis Schridde. Committed on 06/08/2020 at 12:59. Pushed by cmollekopf into branch 'master'. Idempotent CREATE and DELETE If CREATE fails with an ALREADYEXISTS response code, that is not an error since the intended result (the object existing at the target location) has been achieved. Likewise, if DELETE fails with an NONEXISTENT response code, that is not an error since the intended result (the object being gone from the target location) has been achieved. Please note that for RENAME response code ALREADYEXISTS *is* an error since the content of the source folder was not moved as intended. cf. https://tools.ietf.org/html/rfc5530#section-3 M +27 -0 src/createjob.cpp M +2 -1 src/createjob.h M +27 -0 src/deletejob.cpp M +2 -1 src/deletejob.h https://invent.kde.org/pim/kimap2/commit/ce0e9873d3a897fee7fd9f8f7649ef4abd3c4627 |