[ 
https://issues.apache.org/jira/browse/MAILBOX-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tellier Benoit closed MAILBOX-297.
----------------------------------

> Cassandra setFlags operation speed improvment for ranges
> --------------------------------------------------------
>
>                 Key: MAILBOX-297
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-297
>             Project: James Mailbox
>          Issue Type: Bug
>          Components: cassandra
>    Affects Versions: master
>            Reporter: Tellier Benoit
>             Fix For: master
>
>
> We observed that flags updates are very slow on large ranges for Cassandra 
> implementation.
> A quick audit shows that:
>  - We read full messages, and not just specific metadata. Thus we endup 
> performing a "join" on James side, which is costly and not needed
>  - We generate a new modseq on every message, paying much synchronisation 
> costs.
>  - We process the given flags sequentially.
> This is the proposed algorithm changes:
> {code:java}
>     1. Generate MODSEQ
>     2. Read messages metadata to be updated
>     3. Update each message, with condition that MODSEQ should not change 
> since read (Compulsory to not mess up conditional requests):
>        - If OK, compute UpdatedFlags
>        - If not OK, add UID to failed list
>     4. Restart from 1 and try to update the failed list. several time.
> Step 3 can be done in a parallel fashion.
> My answer continues to try to do the update with the failed list.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to