-
Notifications
You must be signed in to change notification settings - Fork 23
CASSANDRA-19355: Refactort CommandsForRange to work based off disk state rather than in-memory state #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.