Skip to content

Conversation

michaelsembwever
Copy link
Member

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

Port into main-5.0 commit 48eb797

CDNB-15253: make UCS shard progression smoother when num_shards and min sstable size are configured (https://github.com/datastax/cassandra/pull/2031)
### What is the issue

https://github.com/riptano/cndb/issues/15253 large shard count jump
was involved in HCD-130

### What does this PR fix and why was it fixed

Replace power-of-two shard progression with factorization-based smooth
growth when base shard count is not power of 2. This prevents
problematic large jumps. For example, with num_shards 1000 which is 5^3* 2^3:

- Before: 1 → 2 → 8 → 1000 (125x jump causes data loss due to hcd-130)
- After:  1 → 5 → 25 → 125 → 250 → 500 → 1000 (max 5x jump)

* new behavior can be disabled via
`-Dunified_compaction.use_factorization_shard_count_growth`

Copy link

github-actions bot commented Oct 9, 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

Copy link

…shards and min sstable size are configured (#2031)

riptano/cndb#15253 large shard count jump
was involved in HCD-130

Replace power-of-two shard progression with factorization-based smooth
growth when base shard count is not power of 2. This prevents
problematic large jumps. For example, with num_shards 1000 which is 5^3* 2^3:

- Before: 1 → 2 → 8 → 1000 (125x jump causes data loss due to hcd-130)
- After:  1 → 5 → 25 → 125 → 250 → 500 → 1000 (max 5x jump)

* new behavior can be disabled via
`-Dunified_compaction.use_factorization_shard_count_growth`
@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-2057 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 / 10
o.a.c.index.sai.cql.VectorBruteforceLocalTest.randomizedBqCompressedTest[ed] (compression) REGRESSION 🔵🔴 0 / 10
o.a.c.nodes.NodesPersistenceTest.testUpdateTokens (compression) REGRESSION 🔴🔵 0 / 10

Found 6 known test failures

@djatnieks djatnieks self-requested a review October 13, 2025 21:08
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