[ 
https://issues.apache.org/jira/browse/JAMES-3058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046112#comment-17046112
 ] 

Benoit Tellier commented on JAMES-3058:
---------------------------------------

https://github.com/linagora/james-project/pull/3110 contributes a service to 
solve cassandra mailbox object inconsistencies. (without concurrency handling 
proposal)

As demonstrated in https://github.com/linagora/james-project/pull/3141, this 
work is prone to (unresolvable) concurrency  issue that can lead to canceling 
legitimate user concurrent actions (with a lower probability with the 
concurrency handling proposal). As such, it should be run offline.

Having this service allow to have a way to handle mailbox inconsistencies on 
the short term (tactical move).

A strategical move would be to have a valid source of truth (which might 
require restructuring the mailbox data model - for example using event 
sourcing) and would require further experiments.

> Webadmin task to solve Cassandra Mailbox inconsistencies
> --------------------------------------------------------
>
>                 Key: JAMES-3058
>                 URL: https://issues.apache.org/jira/browse/JAMES-3058
>             Project: James Server
>          Issue Type: Improvement
>          Components: mailbox, webadmin
>            Reporter: René Cordier
>            Priority: Major
>
> You will implement a task whose goal will be to solve any inconsistencies 
> that could occur between the `mailbox` table and the `mailboxPath` table in 
> Cassandra. You need to solve the following issues :
> * If the mailboxPath exists but not the mailbox => create the corresponding 
> mailbox
> * If the mailbox exists but not the mailboxPath => remove the mailbox 
> (dangling mailbox that probably didn't get correctly removed)
> * If mailbox has id1/path1 and id2/path2 but mailboxPath only have id1/path1 
> => log an error (GhostMailbox issue)
> You can take a look at the similar work that has been done with alias 
> mappings.
> You will then expose the task for Cassandra guice products by reusing the 
> `/maiboxes` route, you will implement the new following `TaskRegistration` : 
> {code:java}
> POST /mailboxes?task=solveInconsistencies
> {code}
> You need to implement as well the proper tests and documentation for it as 
> well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to