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

Stu Hood updated CASSANDRA-640:
-------------------------------

    Attachment: 640-one-use-tree-and-repair-frequency.diff

Here is a patch containing a fix for the issue mentioned above, and 1 other 
important issue:
 * To prevent redundant repairs, when a local tree is generated, it is compared 
to each neighbor tree exactly once before being GCd. We keep per-neighbor 
references to the tree in the 'trees' map, and they are removed as remote trees 
arrive (or as they time out).
 * Natural (automatic) repairs can happen if a major compaction is triggered 
automatically. This patch adds a maximum frequency at which these automatic 
repairs can happen (hardcoded to 1 hour in this patch). The issue was that even 
during simple stress.py tests, the repair process would kick off multiple 
times, and waste a lot of effort.

This patch also removes the 'final' keyword from Pair<T1,T2>, while adding it 
to hashCode and equals (which should give roughly the same performance benefits 
as calling the whole class final). When Pair was final, it was harder to create 
self-explanatory tuples.

Thanks!

> Repair should never reuse a tree
> --------------------------------
>
>                 Key: CASSANDRA-640
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-640
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.5
>            Reporter: Stu Hood
>            Assignee: Stu Hood
>             Fix For: 0.5
>
>         Attachments: 640-one-use-tree-and-repair-frequency.diff
>
>
> AEService currently 'caches' MerkleTrees that have been generated by the 
> local node, and can respond to a request for a tree with a cached version. 
> This means that despite possibly having performed a repair, the two nodes 
> will still be holding cached trees, and can respond to one another with the 
> cached version, resulting in redundant repairs.
> Rather than a cache, the map of trees is intended to be a rendezvous point 
> for two nodes to exchange relatively up-to-date trees. A map still might 
> work, but other synchronization objects should be explored.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to