Skip to content

Conversation

@michaelsembwever
Copy link
Member

@michaelsembwever michaelsembwever commented Oct 20, 2025

https://github.com/riptano/cndb/issues/15665

Port into main-5.0 commit db4ea89

CNDB-15665 : CNDB-14861: Fix usage of PrimaryKeyWithSource in SAI

The PrimaryKeyWithSource class has been
present for two years in the code base
as an optimization for hybrid vector workloads,
which have to materialize many primary keys
in the search-then-sort query path.

However, the logic is invalid for version
aa (because we have the bug where compacted
sstables write per row, not per partition)
and it is also invalid for static columns.
This commit avoids creation of PrimaryKeyWithSource in those cases.

@github-actions
Copy link

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

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
77.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

The PrimaryKeyWithSource class has been
present for two years in the code base
as an optimization for hybrid vector workloads,
which have to materialize many primary keys
in the search-then-sort query path.

However, the logic is invalid for version
aa (because we have the bug where compacted
sstables write per row, not per partition)
and it is also invalid for static columns.
This commit avoids creation of PrimaryKeyWithSource
in those cases.
@cassci-bot
Copy link

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


3 regressions found
See build details here


Found 3 new test failures

Test Explanation Runs Upstream
o.a.c.cql3.validation.operations.AggregationQueriesTest.testAggregationQueryShouldNotTimeoutWhenItExceedesReadTimeout (compression) REGRESSION 🔴🔴 2 / 15
o.a.c.distributed.test.sai.datamodels.QueryWriteLifecycleTest.testWriteLifecycle[CompositePartitionKeyDataModel] () NEW 🔴 0 / 15
o.a.c.nodes.NodesPersistenceTest.testUpdateTokens (compression) REGRESSION 🔵🔴 0 / 15

Found 7 known test failures

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.

5 participants