Skip to content

CNDB-13925: Prefer not analyzed indexes for contains queries (#1718) #1853

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

driftx
Copy link

@driftx driftx commented Jul 3, 2025

Prefer not-analyzed indexes over analyzed indexes for contains queries, so they have a deterministic behaviour.
Also, emit a client warning when a not-analyzed index is selected over an analyzed index.

Otherwise, different points in the codebase will make different, pseudo-random decisions about what index should be used for a certain contains expression, leading to erratic behaviour.

Prefer not-analyzed indexes over analyzed indexes for contains queries,
so they have a deterministic behaviour.
Also, emit a client warning when a not-analyzed index is selected over
an analyzed index.

Otherwise, different points in the codebase will make different,
pseudo-random decisions about what index should be used for a certain
contains expression, leading to erratic behaviour.
Copy link

github-actions bot commented Jul 3, 2025

Checklist before you submit for review

  • 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

@driftx
Copy link
Author

driftx commented Jul 3, 2025

IndexRegistry changed the abstract method signature, 5.0 had to update two anonymous implementations (EMPTY and NON_DAEMON) that were affected by the interface change.

Adjusted imports.

Copy link

sonarqubecloud bot commented Jul 3, 2025

@cassci-bot
Copy link

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


31 new test failure(s) in 1 builds
See build details here


Found 31 new test failures

Showing only first 15 new test failures

Test Explanation Branch history Upstream history
...nQueryShouldNotTimeoutWhenItExceedesReadTimeout regression 🔴
...nglePageReadIsFastButAggregationExceedesTimeout regression 🔴
...adCommitLogAndSSTablesWithDroppedColumnTestCC40 regression 🔴
...adCommitLogAndSSTablesWithDroppedColumnTestCC50 regression 🔴
...oadCommitLogAndSSTablesWithDroppedColumnTestDSE regression 🔴
...thRestartTest.testReadingValuesOfDroppedColumns regression 🔴
o.a.c.d.t.s.f.FeaturesVersionSupportDBTest.testANN regression 🔴
o.a.c.d.t.s.f.FeaturesVersionSupportDCTest.testANN regression 🔴
o.a.c.d.t.s.f.FeaturesVersionSupportEBTest.testANN regression 🔴
...c.FeaturesVersionSupportTest.testANNSupport[eb] regression 🔴
....FeaturesVersionSupportTest.testGeoDistance[aa] regression 🔴
....FeaturesVersionSupportTest.testGeoDistance[ba] regression 🔴
...cySSTableTest.testVerifyOldDroppedTupleSSTables regression 🔴
o.a.c.t.SSTablePartitionsTest.testDirectory regression 🔴
o.a.c.u.b.BinLogTest.testTruncationReleasesLogS... regression 🔴

No known test failures found

@driftx driftx requested a review from djatnieks July 3, 2025 15:13
@driftx driftx merged commit 1c3f70f into main-5.0 Jul 3, 2025
571 of 589 checks passed
@driftx driftx deleted the CNDB-14711 branch July 3, 2025 19:41
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.

4 participants