Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Circumstances
- mailboxPath exists but not the mailbox
- mailbox exists but not the mailboxPath
- if mailbox has id1/path1 and id2/path1 but mailboxPath only have id1/path1 (GhostMailbox)
- mailbox renames https://ci.linagora.com/linagora/lgs/openpaas/james/issues/1586#note_246053
How
mailboxPath exists but not the mailbox
- create a mailbox by `CassandraMailboxMapper.trySave()`
- trigger failure on the second step (mailboxDAO.save()) - (mockito)
mailbox exists but not the mailboxPath
- delete a mailbox `CassandraMailboxMapper.delete()`
- trigger failure on the second step (mailboxDAO.delete()) - (mockito)
if mailbox has id1/path1 and id2/path1 but mailboxPath only have id1/path1 (GhostMailbox)
- Create a mailbox with id1/path1 with pathV1 (pathV1 only, assuming old data at the moment V2 is not yet implemented)
- migrate pathV1 -> pathV2 (insert pathV2, then delete pathV1). Trigger a failure on delete pathV1, then we have both pathV1 and pathV2 exist. (id1/path1)
- delete mailbox id1/path1 (delete pathV1, pathV2 -> delete mailbox). Trigger a failure on delete pathV1 but pathV2 still success. => pathV2 deleted but pathV1, mailbox (id1/path1) still remain.
- create a new mailbox with exact name (id2/path1) -> at this stage we have id1/path1 and id2/path1 on mailbox, id1/path1 on pathV1 and id2/path1 on pathV2.
DOD
tests show that there're inconsistencies after creating or deleting a mailbox. They should be located in CassandraMailboxManagerTest
Attachments
Issue Links
- links to