You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stu Hood (JIRA)" <ji...@apache.org> on 2009/12/18 02:16:18 UTC

[jira] Created: (CASSANDRA-640) Repair should never reuse a tree

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
             Fix For: 0.5


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.


[jira] Commented: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Jun Rao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792562#action_12792562 ] 

Jun Rao commented on CASSANDRA-640:
-----------------------------------

The patch looks reasonable to me.

> 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.


[jira] Commented: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Chris Goffinet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792816#action_12792816 ] 

Chris Goffinet commented on CASSANDRA-640:
------------------------------------------

Typo in commit message, but this has been commited to trunk and 05 branch. 

> 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: 0.5-branch-640-one-use-tree-and-repair-frequency.diff, 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.


[jira] Assigned: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stu Hood reassigned CASSANDRA-640:
----------------------------------

    Assignee: Stu Hood

> 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
>
>
> 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.


[jira] Updated: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Chris Goffinet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792795#action_12792795 ] 

Chris Goffinet commented on CASSANDRA-640:
------------------------------------------

Can you rebase this to apply on cassandra-0.5 branch? It does not apply cleanly

> 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.


[jira] Updated: (CASSANDRA-640) Repair should never reuse a tree

Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-640?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

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

Attaching a version of the patch rebased for 0.5.

> 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: 0.5-branch-640-one-use-tree-and-repair-frequency.diff, 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.