cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler L. Hobbs (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CASSANDRA-1265) make getBuckets deterministic
Date Sat, 10 Jul 2010 06:55:55 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887003#action_12887003
] 

Tyler L. Hobbs edited comment on CASSANDRA-1265 at 7/10/10 2:54 AM:
--------------------------------------------------------------------

The attached patch:
* Sorts the Iterable set of pairs within the getBuckets() function and makes that method generic
* Adds a unit test to CompactionsTest which exercises this function

      was (Author: thobbs):
    The attached patch:
*Sorts the Iterable set of pairs within the getBuckets() function and makes that method generic
*Adds a unit test to CompactionsTest which exercises this function
  
> make getBuckets deterministic
> -----------------------------
>
>                 Key: CASSANDRA-1265
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1265
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>    Affects Versions: 0.6.3
>            Reporter: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.6.4
>
>         Attachments: cassandra-0.6-1265.txt
>
>
> CompactionManager.getBuckets is nondeterministic as explained in the parent issue.
> This can be fixed either by sorting in getBuckets, or requiring that the iterable passed
be sorted already.  Either is fine.
> We also need to add some unit tests to CompactionManagerTest for getBuckets.  We need
to decouple getBuckets a little to do this sanely; rather than examining sstable length directly
or introducing some extra interface, let's declare getBuckets as
>     static Set<List<T>> getBuckets(Iterable<Pair<T, Integer>>
files, long min)
> where the integer in the pair is the file size.  Then you can write tests against Strings
instead of SSTableReaders.

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


Mime
View raw message