Clarify BloomFilter.put return value under concurrency - #8597
Open
NgoQuocViet2001 wants to merge 1 commit into
Open
Clarify BloomFilter.put return value under concurrency#8597NgoQuocViet2001 wants to merge 1 commit into
NgoQuocViet2001 wants to merge 1 commit into
Conversation
Concurrent puts of the same object can each change different bits and return true. Limit the first-insertion and opposite-return guarantees to nonconcurrent calls and document the concurrent case.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
NgoQuocViet2001
force-pushed
the
docs-bloomfilter-concurrent-put-contract
branch
from
August 9, 2026 03:21
f2226ae to
e59b2ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3055.
BloomFilter.putis lock-free, so concurrent calls for the same object can each set a different subset of bits and both returntrue. The existing Javadoc instead states that atrueresult definitely marks the first insertion.This change scopes the first-insertion and
mightContainreturn-value guarantees to nonconcurrent calls and documents the concurrent case. Runtime behavior is unchanged.Tests:
.\mvnw.cmd -B -ntp clean install(865,730 tests; 0 failures or errors)