CASSANDRA-19355: Refactort CommandsForRange to work based off disk state rather than in-memory state#83
CASSANDRA-19355: Refactort CommandsForRange to work based off disk state rather than in-memory state#83dcapwell wants to merge 13 commits intoapache:trunkfrom
Conversation
| { | ||
| int domainSize = (maxExclusive - minInclusive + 1); | ||
| if (domainSize < 0) | ||
| throw new IllegalArgumentException("Range is too large; min=" + minInclusive + ", max=" + maxExclusive); |
There was a problem hiding this comment.
I could support but figured its best to keep this logic simpler until thats needed... if you want mixDistribution(Long.MIN_VALUE, Long.MAX_VALUE) we need BigInteger to handle this...
| int[] array, indexes; | ||
| if (domainSize > 200) // randomly selected | ||
| { | ||
| int numBuckets = 10; |
There was a problem hiding this comment.
when it comes to randomWeight and zipF having larger arrays doesn't make too much sense, so this puts a bias into a smaller array and generates values within that section of the range.
I could make this a config, but I didn't need so can refactor later if needed
|
|
||
| import static accord.utils.Property.qt; | ||
|
|
||
| class SearchableRangeListTest |
There was a problem hiding this comment.
this is kinda duplicated in org.apache.cassandra.utils.RTreeTest#test but has better coverage... I wrote this class first and feel its always best to have tests at this level / project rather than depending on the C* test...
|
|
||
| compileJava { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| sourceCompatibility = JavaVersion.VERSION_11 |
There was a problem hiding this comment.
we actually don't compile on jdk8... so this just makes it so we can use JDK 11 features again
8d6d81c to
c4dedec
Compare
c4dedec to
fa75412
Compare
6a9482b to
4a8566a
Compare
60334d2 to
c3a1d8f
Compare
289d5ea to
064735b
Compare
2edc7fb to
a271897
Compare
50d6ef9 to
bd0761c
Compare
183d5d0 to
cd7f495
Compare
No description provided.