Skip to content

CNDB-18565: Separately enable generic histogram for SAI queries latency - #2577

Open
adelapena wants to merge 1 commit into
main-5.0from
CNDB-18565-main-5.0-enable-histogram
Open

CNDB-18565: Separately enable generic histogram for SAI queries latency#2577
adelapena wants to merge 1 commit into
main-5.0from
CNDB-18565-main-5.0-enable-histogram

Conversation

@adelapena

Copy link
Copy Markdown

What is the issue

Currently we have two histograms for query latency in CNDB, one for range queries and other for single-partition queries.

We usually assume that range queries are SAI queries because before https://github.com/riptano/cndb/issues/16859 all index queries are translated into range queries. However, after that patch SAI queries can be single-partition. Also, regardless of https://github.com/riptano/cndb/issues/16859 we can have queries with ALLOW FILTERING that are difficult to distinguish from SAI queries.

Histograms in CNDB are expensive, but we should probably consider adding yet another CNDB histogram for the latency of SAI queries.

What does this PR fix and why was it fixed

Allow to enable the histogram for the latency of SAI queries of any kind, regardless of the cassandra.sai.metrics.histograms.enabled system property, with a new cassandra.sai.metrics.histograms.all_queries.enabled. The histogram will be enabled if any of those two properties is true.

All the other similar histograms still depend on the cassandra.sai.metrics.histograms.enabled system property alone.

# Conflicts:
#	src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
@adelapena adelapena self-assigned this Aug 21, 2026
@github-actions

Copy link
Copy Markdown

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR and ticket 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%, check manually at SonarCloud page
  • 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 IBM copyright header instead of the Apache License one (no DataStax copyright any longer)

@adelapena
adelapena requested a review from pkolaczk August 21, 2026 12:51
@sonarqube-dx-prod

Copy link
Copy Markdown

@plpesvc-ds

Copy link
Copy Markdown

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


3 regressions found
See build details here


Found 3 new test failures

Test Explanation Runs Upstream
o.a.c.concurrent.StageTimeMeasurementTest.executionAndQueueTimeAreCountedOnSubmitWithResult (compression) REGRESSION 🔴 0 / 30
o.a.c.index.sai.cql.VectorCompaction100dTest.testZeroOrOneToManyCompaction[version=dc enableNVQ=false] () NEW 🔴 0 / 30
o.a.c.index.sai.cql.VectorSiftSmallTest.testSiftSmall[ec true] () NEW 🔴 0 / 30

Found 2 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.

2 participants