Skip to content

Conversation

@adelapena
Copy link

What is the issue

See https://github.com/riptano/cndb/issues/15619

What does this PR fix and why was it fixed

  • Introduce an callback to get the SAI version to use for a specific keyspace (defaults to cassandra.sai.latest.versison)
  • Introduce a Optional parameter to Version.current() and call it everywhere apart from tests
  • The new code should be "faster" because in many places we used to call current() that in turn reads a volatile variable, now on some hot paths we are using a final field (in IndexContext or other places)

This is a cherry pick of 82064a0

… current() depending on a keyspace (#2041)

There is a new cassandra.sai.version.selector.class system property allowing
to provide an implementation of the o.a.c.index.sai.disk.format.Version.Selector
interface to specify that version of the SAI on-disk index format should be
used for each keyspace.

Co-authored-by: Enrico Olivelli <[email protected]>
Co-authored-by: Andrés de la Peña <[email protected]>
@adelapena adelapena self-assigned this Oct 21, 2025
@github-actions
Copy link

github-actions bot commented Oct 21, 2025

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

Copy link

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Patch is exactly the same as 82064a0

@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-2081 rejected by Butler


2 regressions found
See build details here


Found 2 new test failures

Test Explanation Runs Upstream
o.a.c.index.sai.cql.VectorKeyRestrictedOnPartitionTest.partitionRestrictedWidePartitionBqCompressedTest[ec] (compression) NEW 🔴 0 / 0
o.a.c.metrics.TrieMemtableMetricsTest.testContentionMetrics (compression) NEW 🔴 0 / 0

No known test failures found

@adelapena
Copy link
Author

The failure of testContentionMetrics is https://github.com/riptano/cndb/issues/11971.
The failure of partitionRestrictedWidePartitionBqCompressedTest is https://github.com/riptano/cndb/issues/15197.

@adelapena adelapena merged commit dc6e789 into cndb-main-release-202510 Oct 21, 2025
486 of 495 checks passed
@adelapena adelapena deleted the CNDB-15619-main-release-202510 branch October 21, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants