philipnee commented on code in PR #14842:
URL: https://github.com/apache/kafka/pull/14842#discussion_r1408236793
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java:
##########
@@ -269,60 +275,56 @@ void cleanup() {
* completed in time.
*/
// Visible for testing
- void maybeAutoCommitAndLeaveGroup(final Timer timer) {
+ void maybeAutocommitOnClose(final Timer timer) {
if (!requestManagers.coordinatorRequestManager.isPresent())
return;
+ if (!requestManagers.commitRequestManager.isPresent()) {
+ log.error("Expecting a CommitRequestManager but the object was
never initialized. Shutting down.");
+ return;
+ }
+
+ if (!requestManagers.commitRequestManager.get().canAutoCommit()) {
+ return;
+ }
+
ensureCoordinatorReady(timer);
- List<NetworkClientDelegate.UnsentRequest> tasks = closingRequests();
- networkClientDelegate.addAll(tasks);
+ List<NetworkClientDelegate.UnsentRequest> autocommitRequest =
Review Comment:
Cannot agree more!
--
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]