-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-13192: Bump the default cassandra.sai.latest.version
from DC
to EC
so we support BM25 by default.
#1737
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: main
Are you sure you want to change the base?
Conversation
Checklist before you submit for review
|
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.
Pull Request Overview
This PR bumps the default SAI version configuration to support BM25 by default, fixes Version.LATEST to point to ED, and improves test coverage by moving and adding tests.
- Update default SAI version property in CassandraRelevantProperties.java.
- Change Version.LATEST from EC to ED in Version.java.
- Update and refactor tests across BM25Test, FeaturesVersionSupportTest, SAITester, and add FeaturesVersionSupportEDTest.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/unit/org/apache/cassandra/index/sai/cql/FeaturesVersionSupportTest.java | Added new testIndexMetaForNumRows and supporting helper methods for SAI index metadata validation. |
test/unit/org/apache/cassandra/index/sai/cql/BM25Test.java | Removed duplicate SAI index metadata test code. |
test/unit/org/apache/cassandra/index/sai/SAITester.java | Moved common collection data utilities to SAITester. |
test/distributed/org/apache/cassandra/distributed/test/sai/features/FeaturesVersionSupportEDTest.java | Added distributed test for ED version support. |
src/java/org/apache/cassandra/index/sai/disk/format/Version.java | Updated Version.LATEST to point to ED. |
src/java/org/apache/cassandra/config/CassandraRelevantProperties.java | Updated default property value for SAI version from "dc" to "ec". |
for (var memtable : getCurrentColumnFamilyStore().getAllMemtables()) | ||
{ | ||
MemtableIndex memIndex = getIndexContext(indexName).getLiveMemtables().get(memtable); | ||
assert memIndex instanceof TrieMemtableIndex; |
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.
Consider replacing the use of the Java assert statement with an explicit JUnit assertion (such as assertTrue) to ensure the check is enforced even when JVM assertions are disabled.
assert memIndex instanceof TrieMemtableIndex; | |
Assert.assertTrue(memIndex instanceof TrieMemtableIndex); |
Copilot uses AI. Check for mistakes.
rowCount = Arrays.stream(((TrieMemtableIndex) memIndex).getRangeIndexes()) | ||
.map(index -> ((TrieMemoryIndex) index).getDocLengths().size()) | ||
.mapToInt(Integer::intValue).sum(); |
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.
If multiple memtables exist, the current implementation overwrites the rowCount per iteration instead of accumulating values. Consider summing the row counts from all memtables to correctly reflect the total number of rows.
rowCount = Arrays.stream(((TrieMemtableIndex) memIndex).getRangeIndexes()) | |
.map(index -> ((TrieMemoryIndex) index).getDocLengths().size()) | |
.mapToInt(Integer::intValue).sum(); | |
rowCount += Arrays.stream(((TrieMemtableIndex) memIndex).getRangeIndexes()) | |
.map(index -> ((TrieMemoryIndex) index).getDocLengths().size()) | |
.mapToInt(Integer::intValue).sum(); |
Copilot uses AI. Check for mistakes.
The switch to testing on the latest version ED led to two tests failing:
This one is not a regression, as marked by Butler, there is also a ticket for it - The others seem to be failures with previous versions, where we did not touch anything, so they seem unrelated. |
4301ff9
to
b4ce373
Compare
cassandra.sai.latest.version
from DC
to EC
so we support BM25 by default. Fix Version.LATEST
to point to recently added ED
and fix its test coverage.cassandra.sai.latest.version
from DC
to EC
so we support BM25 by default.
Updated the PR with only the default version update as per the original intention. |
b4ce373
to
0f14083
Compare
We fixed 3 issues related to EB+ versions that were caught by CI testing in other tickets. |
|
❌ Build ds-cassandra-pr-gate/PR-1737 rejected by Butler4 new test failure(s) in 1 builds Found 4 new test failures
Found 2 known test failures |
What is the issue
...
Bump the default
cassandra.sai.latest.version
fromDC
toEC
so we support BM25 by default.Update jvector_version to 4.
What does this PR fix and why was it fixed
...
Bump the default
cassandra.sai.latest.version
fromDC
toEC
so we support BM25 by default.Update jvector_version to 4.