Skip to content
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 read write request leak when executor throw RejectedExecutionException #4024

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,9 @@ private void processAddRequest(final BookieProtocol.ParsedAddRequest r, final Bo
BookieProtocol.ETOOMANYREQUESTS,
ResponseBuilder.buildErrorResponse(BookieProtocol.ETOOMANYREQUESTS, r),
requestStats.getAddRequestStats());
r.release();
r.recycle();
write.recycle();
}
}
}
Expand Down Expand Up @@ -703,6 +706,7 @@ private void processReadRequest(final BookieProtocol.ReadRequest r, final Bookie
ResponseBuilder.buildErrorResponse(BookieProtocol.ETOOMANYREQUESTS, r),
requestStats.getReadRequestStats());
onReadRequestFinish();
read.recycle();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public String toString() {
return String.format("ReadEntry(%d, %d)", request.getLedgerId(), request.getEntryId());
}

private void recycle() {
void recycle() {
request.recycle();
super.reset();
this.recyclerHandle.recycle(this);
Expand Down
Loading