Skip to content

Conversation

@driftx
Copy link

@driftx driftx commented Sep 30, 2025

What is the issue

TOCComponent performs component discovery before loading the TOC. This can be detrimental to custom component loading and can be optimized to try loading the TOC directly first before resorting to discovery.

What does this PR fix and why was it fixed

Load the TOC component without discovery if possible

@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
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@cassci-bot
Copy link

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


7 regressions found
See build details here


Found 7 new test failures

Test Explanation Runs Upstream
replica_side_filtering_test.TestAllowFiltering.test_update_on_collection (offheap-bti) <span title="The test is NOT RUN on upstream but FLAKY on feature:
• Feature branch: FLAKY because there are 1 passing, 1 failing, 0 missing, and 0 skipped runs in the last 2 runs in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔵🔴 0 / 8
replica_side_filtering_test.TestAllowFiltering.test_update_on_wide_table (offheap-bti) <span title="The test is NOT RUN on upstream but FLAKY on feature:
• Feature branch: FLAKY because there are 1 passing, 1 failing, 0 missing, and 0 skipped runs in the last 2 runs in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔵🔴 0 / 8
o.a.c.cql3.validation.operations.AggregationQueriesTest.testAggregationQueryShouldNotTimeoutWhenItExceedesReadTimeout (compression) <span title="The test is NOT RUN on upstream but FAILING on feature:
• Feature branch: FAILING in the recent 2 >= 2 minimum runs (2 actual failures, 0 missing/skipped) in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔴🔴 2 / 8
o.a.c.db.ColumnFamilyStoreTest.testSnapshotCreationAndDeleteEmptyTable () <span title="The test is NOT RUN on upstream but FAILING on feature:
• Feature branch: FAILING in the recent 2 >= 2 minimum runs (1 actual failures, 1 missing/skipped) in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔴 1 / 8
o.a.c.db.compaction.unified.ShardedMultiWriterTest.testShardedCompactionWriter_threeShard[isReplicaAware=true] (compression) <span title="The test is NOT RUN on upstream but FLAKY on feature:
• Feature branch: FLAKY because there are 1 passing, 1 failing, 0 missing, and 0 skipped runs in the last 2 runs in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔴🔵 0 / 8
o.a.c.index.SecondaryIndexManagerTest.testIndexRebuildWhenAddingSStableViaRemoteReload (compression) <span title="The test is NOT RUN on upstream but FAILING on feature:
• Feature branch: FAILING in the recent 2 >= 2 minimum runs (2 actual failures, 0 missing/skipped) in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔴🔴 7 / 8
o.a.c.index.sai.cql.datamodels.QueryWriteLifecycleWithCompositePartitionKeyTest.testWriteLifecycle[ca] () <span title="The test is NOT RUN on upstream but FAILING on feature:
• Feature branch: FAILING in the recent 2 >= 2 minimum runs (1 actual failures, 1 missing/skipped) in 4 builds (1 to 5)
• Upstream branch: MISSING in the last run in 8 builds (147 to 154)">NEW 🔴 0 / 8

Found 3 known test failures

Copy link

@djatnieks djatnieks left a comment

Choose a reason for hiding this comment

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

Left a question


File compressionFile = desc.fileFor(Components.COMPRESSION_INFO);
if (!compressionFile.exists())
return null;

Choose a reason for hiding this comment

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

This check is not needed?

Copy link
Author

Choose a reason for hiding this comment

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

From what I can tell it's an optimization to return early. The exists() triggers an opening of the file though and that is what causes issues.

@driftx driftx merged commit 5e94c3c into main-5.0 Sep 30, 2025
569 of 587 checks passed
@driftx driftx deleted the CNDB-15526 branch September 30, 2025 20:38
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