-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[metadata-store] Fix metadata cache inconsistency on doing refresh #14283
Merged
lhotari
merged 1 commit into
apache:master
from
Demogorgon314:fix/make-metadata-cache-refresh-async
Feb 15, 2022
Merged
[metadata-store] Fix metadata cache inconsistency on doing refresh #14283
lhotari
merged 1 commit into
apache:master
from
Demogorgon314:fix/make-metadata-cache-refresh-async
Feb 15, 2022
Conversation
This file contains 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
merlimat
reviewed
Feb 15, 2022
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStoreConfig.java
Outdated
Show resolved
Hide resolved
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStore.java
Outdated
Show resolved
Hide resolved
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/Notifiable.java
Outdated
Show resolved
Hide resolved
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java
Outdated
Show resolved
Hide resolved
codelipenghui
added
the
release/blocker
Indicate the PR or issue that should block the release until it gets resolved
label
Feb 15, 2022
ben-manes
reviewed
Feb 15, 2022
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/cache/impl/MetadataCacheImpl.java
Outdated
Show resolved
Hide resolved
Demogorgon314
force-pushed
the
fix/make-metadata-cache-refresh-async
branch
from
February 15, 2022 08:16
a71692d
to
ab6ef2b
Compare
Demogorgon314
changed the title
[metadata-store] Fix race condition by making metadata cache refresh async
[metadata-store] Fix metadata cache inconsistency on doing refresh
Feb 15, 2022
codelipenghui
approved these changes
Feb 15, 2022
hangc0276
approved these changes
Feb 15, 2022
eolivelli
approved these changes
Feb 15, 2022
lhotari
approved these changes
Feb 15, 2022
@Demogorgon314 I still get test error: https://github.com/apache/pulsar/runs/5231565908?check_suite_focus=true |
I'll push a PR to fix it. |
@gaozhangmin PTAL #14354 : ) |
Nicklee007
pushed a commit
to Nicklee007/pulsar
that referenced
this pull request
Apr 20, 2022
This was referenced Apr 20, 2022
Open
congbobo184
added
cherry-picked/branch-2.9
Archived: 2.9 is end of life
release/2.9.4
labels
Nov 9, 2022
congbobo184
pushed a commit
to congbobo184/pulsar
that referenced
this pull request
Nov 9, 2022
(cherry picked from commit 2e16b43)
congbobo184
pushed a commit
that referenced
this pull request
Nov 9, 2022
(cherry picked from commit 2e16b43)
congbobo184
pushed a commit
that referenced
this pull request
Nov 26, 2022
(cherry picked from commit 2e16b43)
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.9
Archived: 2.9 is end of life
doc-not-needed
Your PR changes do not impact docs
release/blocker
Indicate the PR or issue that should block the release until it gets resolved
release/2.9.4
type/bug
The PR fixed a bug or issue reported a bug
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 #14110 #14096 #14219
Motivation
Currently, the metadata cache refresh has race condition.
The main reason is
MetadataCacheImpl#refresh
is not atomic operations.I added some log in MetadataCacheImpl in order to observe:
Cache inconsistency, you can see the async load for objCache complete in mid of refresh :
Correct log:
Modifications
Make metadata cache refresh method atomic.
Verifying this change
Documentation
Need to update docs?
no-need-doc