You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In BP-59, which was not discussed in the dev mail list and without a vote refactored the ByteBuf release method by ReferenceCountUtil.safeRelease() instead of ByteBuf.release().
In the ReferenceCountUtil.safeRelease(), it catches the release exception. This change can make the ByteBuf release without any exceptions and makes the code run well, but it will make bugs hide deeper and more challenging to find out.
publicstaticvoidsafeRelease(Objectmsg) {
try {
release(msg);
} catch (Throwablet) {
logger.warn("Failed to release a message: {}", msg, t);
}
}
For example, if there is a bug to release the ByteBuf twice, whose refcnt is 1, we can find out the bug quickly if we use ByteBuf.release(), but the bug will be hard to find out if we use ReferenceCountUtil.safeRelease()
There are 12 PRs to refactor the ByteBuf release method, and I suggest reverting those PRs.
Considering some PRs have been cherry-picked into the release branch but others not, it will be hard to cherry-pick if we just push one PR to revert all the above PRs. I will push three Prs for master, branch-4.15, and branch-4.14 to apply this change.
BP
This is the master ticket for tracking BP-61 :
Motivation
In BP-59, which was not discussed in the dev mail list and without a vote refactored the ByteBuf release method by ReferenceCountUtil.safeRelease() instead of ByteBuf.release().
In the
ReferenceCountUtil.safeRelease()
, it catches the release exception. This change can make the ByteBuf release without any exceptions and makes the code run well, but it will make bugs hide deeper and more challenging to find out.For example, if there is a bug to release the ByteBuf twice, whose refcnt is 1, we can find out the bug quickly if we use ByteBuf.release(), but the bug will be hard to find out if we use
ReferenceCountUtil.safeRelease()
There are 12 PRs to refactor the ByteBuf release method, and I suggest reverting those PRs.
Considering some PRs have been cherry-picked into the release branch but others not, it will be hard to cherry-pick if we just push one PR to revert all the above PRs. I will push three Prs for master, branch-4.15, and branch-4.14 to apply this change.
Proposal PR
The text was updated successfully, but these errors were encountered: