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

MINOR: use readlock for read epochs #13483

Merged
merged 1 commit into from Mar 31, 2023

Conversation

showuon
Copy link
Contributor

@showuon showuon commented Mar 31, 2023

use readlock for epochs reading

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@showuon
Copy link
Contributor Author

showuon commented Mar 31, 2023

@divijvaidya @satishd , a quick fix for the lock.

Copy link
Member

@satishd satishd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @showuon for the PR. LGTM.

@@ -383,11 +382,11 @@ public void clear() {

// Visible for testing
public List<EpochEntry> epochEntries() {
lock.writeLock().lock();
lock.readLock().lock();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@satishd
Copy link
Member

satishd commented Mar 31, 2023

Failed tests are not related to this change, merging to trunk.

@satishd satishd merged commit d849d66 into apache:trunk Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants