Skip to content

Conversation

@adelapena
Copy link

ReplicaFilteringProtection has a very useful log message saying when a query has collected more than a certain configurable number of rows, 2000 by default, here:

String message = String.format("Replica filtering protection has cached over %d rows during query %s. " +
                               "(See 'cached_replica_rows_fail_threshold' in cassandra.yaml.)",
                               cachedRowsFailThreshold, command.toCQLString());

This message has been very useful while investigating incidents because it has allowed us to identify which specific queries were returning many rows. The only thing that we missed is that it didn't say exactly how many rows were returned. While we can have metrics for that, it would be useful if this log message also included the specific number of rows.

This PR includes the number of rows cached by RFP when it exceeds either its warning or failure threshold. For this, the warning threshold check is moved to the end of the query, so we can report the maximum number of cached rows just once.

@adelapena adelapena self-assigned this Aug 21, 2025
@github-actions
Copy link

github-actions bot commented Aug 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

@sonarqubecloud
Copy link

@cassci-bot
Copy link

✔️ Build ds-cassandra-pr-gate/PR-1959 approved by Butler


Approved by Butler
See build details here

@adelapena adelapena merged commit 851accf into main Aug 22, 2025
494 checks passed
@adelapena adelapena deleted the CNDB-15156-main branch August 22, 2025 14:17
@adelapena
Copy link
Author

Thanks for the review.

djatnieks pushed a commit that referenced this pull request Aug 28, 2025
…FP warn (#1959)

Include the number of rows cached by RFP when it exceeds either
its warning or failure threshold. For this, the warning threshold check
is moved to the end of the query, so we can report the maximum number of
cached rows just once.
djatnieks pushed a commit that referenced this pull request Aug 29, 2025
…FP warn (#1959)

Include the number of rows cached by RFP when it exceeds either
its warning or failure threshold. For this, the warning threshold check
is moved to the end of the query, so we can report the maximum number of
cached rows just once.
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