Skip to content
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

[Issue 13004] Fix race condition in ResourceLockImpl#revalidate #13006

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

Jason918
Copy link
Contributor

@Jason918 Jason918 commented Nov 28, 2021

Fixes #13004

Motivation

See #13004

Modifications

Add a new field revalidateFuture to store the status of last revalidate. If it's not done, then current revalidate will be executed after last revalidateFuture is complete.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, such as LeaderElectionTest#leaderNodeIsDeletedExternally and other test cases in LockManagerTest and LeaderElectionTest

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc
    Bug fix.

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Nov 28, 2021
@Jason918
Copy link
Contributor Author

/pulsarbot run-failure-checks

@merlimat merlimat added the type/bug The PR fixed a bug or issue reported a bug label Nov 29, 2021
@merlimat merlimat added this to the 2.10.0 milestone Nov 29, 2021
@merlimat merlimat merged commit bb2c934 into apache:master Nov 29, 2021
fxbing pushed a commit to fxbing/pulsar that referenced this pull request Dec 19, 2021
codelipenghui pushed a commit that referenced this pull request Dec 21, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs release/2.9.2 type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metadata] Race condition in ResourceLockImpl#revalidate
5 participants