You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2011/03/04 17:17:37 UTC

[jira] Created: (CASSANDRA-2272) Refactor Key and Row caches handling code

Refactor Key and Row caches handling code 
------------------------------------------

                 Key: CASSANDRA-2272
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
            Priority: Minor
         Attachments: 0001-Refactor-key-and-row-cache-handling-code.patch

The code related to key and row caches has a bunch of code duplication. It's
moreover a bit scattered, the caches are in SSTableTracker but the scheduled
task to save them are in CFStore. And having the caches in SSTableTracker is
not very logic, for row cache at least, since it does not only concern the
sstables. Proposed patch refactor this to avoid the duplication and put all
the cache handling code in one place.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment:     (was: 0001-Refactor-key-and-row-cache-handling-code-v2.patch)

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Jonathan Ellis updated CASSANDRA-2272:
--------------------------------------

    Reviewer: mdennis

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne commented on CASSANDRA-2272:
---------------------------------------------

The v4 changes look good. Thanks

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Matthew F. Dennis updated CASSANDRA-2272:
-----------------------------------------

    Attachment: 2272_trunk_v4.txt

attached v4 patch:

1) prefers explicit [key|row] cache objects that extend AutoSavingCache in preference to branching on CacheType (e.g. "if (cacheType == blah)")

2) minor formatting changes in generic declarations

3) minor name changes

+1 otherwise

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment:     (was: 0001-Refactor-key-and-row-cache-handling-code-v2.patch)

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment: 0001-Refactor-key-and-row-cache-handling-code-v2.patch

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2272) Refactor Key and Row caches handling code

Posted by "Matthew F. Dennis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006686#comment-13006686 ] 

Matthew F. Dennis commented on CASSANDRA-2272:
----------------------------------------------

can you rebase on trunk please?

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment: 0001-Refactor-key-and-row-cache-handling-code-v2.patch

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment: 0001-Refactor-key-and-row-cache-handling-code-v3.patch

Attaching rebased v3

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Sylvain Lebresne updated CASSANDRA-2272:
----------------------------------------

    Attachment: 0001-Refactor-key-and-row-cache-handling-code-v2.patch

Attaching a v2 that add a few refactor missing from first patch (the method cfs.reduceCacheSizes() and the rewrite of occurrences of ssTables.getRowCache() to rowCache in cfstore)

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Hudson commented on CASSANDRA-2272:
-----------------------------------

Integrated in Cassandra #789 (See [https://hudson.apache.org/hudson/job/Cassandra/789/])
    

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt, 2272_trunk_v5.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (CASSANDRA-2272) Refactor Key and Row caches handling code

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

Matthew F. Dennis updated CASSANDRA-2272:
-----------------------------------------

    Attachment: 2272_trunk_v5.txt

v5 rebased to trunk

> Refactor Key and Row caches handling code 
> ------------------------------------------
>
>                 Key: CASSANDRA-2272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2272
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Refactor-key-and-row-cache-handling-code-v2.patch, 0001-Refactor-key-and-row-cache-handling-code-v3.patch, 0001-Refactor-key-and-row-cache-handling-code.patch, 2272_trunk_v4.txt, 2272_trunk_v5.txt
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> The code related to key and row caches has a bunch of code duplication. It's
> moreover a bit scattered, the caches are in SSTableTracker but the scheduled
> task to save them are in CFStore. And having the caches in SSTableTracker is
> not very logic, for row cache at least, since it does not only concern the
> sstables. Proposed patch refactor this to avoid the duplication and put all
> the cache handling code in one place.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira