-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[pulsar-broker] Fix race condition of read-timeout task in ML #4437
Conversation
rerun java8 tests |
rerun integration tests |
@Override | ||
public void readEntryComplete(Entry entry, Object ctx) { | ||
if (checkCallbackCompleted(ctx)) { | ||
long reOpCount = (ctx != null && ctx instanceof Long) ? (long) ctx : 0; |
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.
I see this pattern is repeated many times. Can we abstract this logic into a common method or rewrite those methods using this pattern into one common method?
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.
sure.. made the change.
rerun java8 tests |
1 similar comment
rerun java8 tests |
Motivation
Fix race condition when read-timeout task and read-callback try to recycle same calback object. We will close #4434 once this fix is merged.