ShivsundarR commented on code in PR #16727:
URL: https://github.com/apache/kafka/pull/16727#discussion_r1709303701
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java:
##########
@@ -749,58 +869,104 @@ UnsentRequest buildRequest(long currentTimeMs) {
BiConsumer<ClientResponse, Throwable> responseHandler =
(clientResponse, error) -> {
if (error != null) {
- onFailedAttempt(currentTimeMs);
errorHandler.handle(nodeToSend, requestBuilder.data(),
this, error, currentTimeMs);
processingComplete();
} else {
successHandler.handle(nodeToSend, requestBuilder.data(),
this, clientResponse, currentTimeMs);
+ if (onClose && !closeFuture.isDone()) {
+ closeFuture.complete(null);
+ }
}
};
if (requestBuilder == null) {
- log.trace("Building ShareAcknowledge request to send to node
{} failed", nodeToSend.id());
handleSessionErrorCode(Errors.SHARE_SESSION_NOT_FOUND);
return null;
} else {
- log.trace("Building ShareAcknowledge request to send to node
{}", nodeToSend.id());
+ inFlightAcknowledgements.putAll(finalAcknowledgementsToSend);
+ if (incompleteAcknowledgements.isEmpty()) {
+ acknowledgementsToSend.clear();
+ } else {
+ incompleteAcknowledgements.clear();
Review Comment:
Yes, it was not required, I have removed it now.
--
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]