Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

receive: Support percentage-based shard_size for shuffle sharding (rendezvous only)#310

Merged
yuchen-db merged 1 commit into
db_mainfrom
yuchen-db/shuffle-sharding-percentage
Mar 13, 2026
Merged

receive: Support percentage-based shard_size for shuffle sharding (rendezvous only)#310
yuchen-db merged 1 commit into
db_mainfrom
yuchen-db/shuffle-sharding-percentage

Conversation

@yuchen-db

@yuchen-db yuchen-db commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Add a ShardSize type that accepts both integer (e.g. 6) and percentage string (e.g. "50%") in JSON config. For the rendezvous algorithm, percentage resolves directly against per-AZ common shard count (max(1, len(commonShards) * pct)), bypassing the totalShardSize/numAZs division. Ketama path remains integer-only and rejects percentages with a clear error.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

…ndezvous only)

Add a ShardSize type that accepts both integer (e.g. 6) and percentage
string (e.g. "50%") in JSON config. For the rendezvous algorithm,
percentage resolves directly against per-AZ common shard count
(max(1, len(commonShards) * pct)), bypassing the totalShardSize/numAZs
division. Ketama path remains integer-only and rejects percentages with
a clear error.

Co-authored-by: Isaac
@yuchen-db yuchen-db merged commit 3539c09 into db_main Mar 13, 2026
14 checks passed
@yuchen-db yuchen-db deleted the yuchen-db/shuffle-sharding-percentage branch March 13, 2026 20:49
yuchen-db added a commit that referenced this pull request Mar 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants