-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Strengthen locking in FsBlobContainer
register impl
#107830
Changes from 5 commits
780285a
481bf67
c2bac7c
9d83d38
36eb5fe
b6cf2aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,7 +156,13 @@ public void onFailure(Exception e) { | |
}; | ||
|
||
if (request.getInitialRead() > request.getRequestCount()) { | ||
blobContainer.getRegister(OperationPurpose.REPOSITORY_ANALYSIS, registerName, initialValueListener); | ||
blobContainer.getRegister(OperationPurpose.REPOSITORY_ANALYSIS, registerName, initialValueListener.delegateFailure((l, r) -> { | ||
if (r.isPresent()) { | ||
l.onResponse(r); | ||
} else { | ||
l.onFailure(new IllegalStateException("register read failed due to contention")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DaveCTurner raising your attention that it seems to fail There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the ping, clearly a bug: #108900 |
||
} | ||
})); | ||
} else { | ||
blobContainer.compareAndExchangeRegister( | ||
OperationPurpose.REPOSITORY_ANALYSIS, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not handled by the try-with-resource above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d'oh yes it is