Uh oh!
There was an error while loading. Please reload this page.
Fix deadlock in getCommit - #1460
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@## main #1460 +/- ##
=========================================
Coverage 78.76% 78.76% Complexity 2100 2100 =========================================
Files 201 201 Lines 6390 6390 Branches 359 359 =========================================
Hits 5033 5033 Misses 1149 1149 Partials 208 208
Continue to review full report at Codecov.
|
bitwiseman
approved these changes
May 22, 2022
bitwiseman
left a comment
Member
There was a problem hiding this comment.
I'm not clear why we're even using WeakHashMap here, but in terms of making theses particular fields not deadlock, this seems like a low risk change.
scottrw93
commented
May 23, 2022
ContributorAuthor
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 freeto 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.
Description
We are seeing infrequent deadlocks using the
GHRepository::getCommitfrom a threadpool.thread dump snippet
WeakHashMap is not threadsafe, and using
Collections.synchronisedMapis the recommended way of making it so if this client should be usable concurrently?Before submitting a PR:
mvn -D enable-ci clean install sitelocally. If this command doesn't succeed, your change will not pass CI.main. You will create your PR from that branch.When creating a PR: