Skip to content

[python] Fix bucket registration for dynamic bucket overflow - #9788

Open
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:python-bucket-overflow
Open

[python] Fix bucket registration for dynamic bucket overflow#9788
QuakeWang wants to merge 1 commit into
apache:masterfrom
QuakeWang:python-bucket-overflow

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Follow-up on #7363. Newly allocated buckets received count entries before candidate registration, causing registration to be skipped. Once the bucket limit was reached, only the first bucket remained eligible for random assignment.

Register each bucket when it is allocated, keeping candidates complete and duplicate-free while preserving the random selection strategy and existing hash mappings.

Tests

  • Added regression tests for bucket registration, overflow candidates, and existing hash mappings.
  • Simple hash bucket assigner and dynamic bucket tests: 26 passed.
  • Flake8 and license header checks passed.

Register each bucket when it is selected as a new bucket. Previously, later buckets received count entries before registration, leaving only the first bucket eligible for overflow assignment.

Add regression coverage for complete, duplicate-free candidates and stable existing hash mappings.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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.

1 participant