Skip to content

Commit

Permalink
Fix QueueEntry recycle problem. (apache#3747)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
horizonzy authored and hangc0276 committed Feb 8, 2023
1 parent 9e0e198 commit e841a3d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ protected QueueEntry newObject(Recycler.Handle<QueueEntry> handle) {
};

private void recycle() {
this.entry = null;
this.cb = null;
this.ctx = null;
this.journalAddEntryStats = null;
this.journalCbQueueSize = null;
recyclerHandle.recycle(this);
}
}
Expand Down

0 comments on commit e841a3d

Please sign in to comment.