Skip to content

[CORE] Return unmodifiable Set from ConsistentHash.getPartition()#11823

Closed
acvictor wants to merge 1 commit into
apache:mainfrom
acvictor:acvictor/conHash
Closed

[CORE] Return unmodifiable Set from ConsistentHash.getPartition()#11823
acvictor wants to merge 1 commit into
apache:mainfrom
acvictor:acvictor/conHash

Conversation

@acvictor
Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

ConsistentHash is annotated with @ThreadSafe and guards all access with a ReadWriteLock but getPartition() returns a direct reference to the internal mutable HashSet. This PR wraps the returned set with Collections.unmodifiableSet() similar to getNodes() which already returns a copy.

How was this patch tested?

Existing UTs

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions Bot added the CORE works for Gluten Core label Mar 25, 2026
@github-actions
Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the stale stale label May 10, 2026
@github-actions
Copy link
Copy Markdown

This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.

@github-actions github-actions Bot closed this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core stale stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant