chia7712 commented on code in PR #21396:
URL: https://github.com/apache/kafka/pull/21396#discussion_r2764684836
##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -754,7 +754,8 @@ private void unload() {
timer.cancelAll();
executor.cancelAll();
deferredEventQueue.failAll(Errors.NOT_COORDINATOR.exception());
- failCurrentBatch(Errors.NOT_COORDINATOR.exception());
+ // There is no need to free the current batch, as we will be
closing all related resources anyway.
+ failCurrentBatch(Errors.NOT_COORDINATOR.exception(), false);
Review Comment:
Would you mind adding a readable method? for example:
```java
private void failCurrentBatchWithoutRelease(Throwable t) {
failCurrentBatch(t, false);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]