-
Notifications
You must be signed in to change notification settings - Fork 892
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
Fix QueueEntry recycle problem. #3747
Conversation
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.
Nice catch!
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.
Great work
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.
nice work!
callbackTime.addLatency(MathUtils.elapsedNanos(startTime), TimeUnit.NANOSECONDS); | ||
recycle(); |
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.
@horizonzy This change wasn't mentioned in the PR description. Why was this missing before? Was the recycling completely unused before? /cc @hangc0276
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.
Cause we already reset callbackTime
to null. And we should ensure do all works before recycle self, instead of addLatency
after recycle self.
Descriptions of the changes in this PR: In the QueueEntry recycle, it only recycles itself to the object pool, but didn't reset some properties. Like entry, cb, etc. We should reset the filed before recycles itself. (cherry picked from commit 901f76c)
Descriptions of the changes in this PR: In the QueueEntry recycle, it only recycles itself to the object pool, but didn't reset some properties. Like entry, cb, etc. We should reset the filed before recycles itself. (cherry picked from commit 901f76c)
Descriptions of the changes in this PR:
In the QueueEntry recycle, it only recycles itself to the object pool, but didn't reset some properties.
Like entry, cb, etc. We should reset the filed before recycles itself.