lianetm commented on code in PR #14386:
URL: https://github.com/apache/kafka/pull/14386#discussion_r1330551023
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -395,27 +386,28 @@ class PendingRequests {
List<OffsetFetchRequestState> unsentOffsetFetches = new ArrayList<>();
List<OffsetFetchRequestState> inflightOffsetFetches = new
ArrayList<>();
- public boolean hasUnsentRequests() {
+ // Visible for teseting
+ boolean hasUnsentRequests() {
return !unsentOffsetCommits.isEmpty() ||
!unsentOffsetFetches.isEmpty();
}
- public CompletableFuture<ClientResponse> addOffsetCommitRequest(final
Map<TopicPartition, OffsetAndMetadata> offsets) {
+ CompletableFuture<Void> addOffsetCommitRequest(final
Map<TopicPartition, OffsetAndMetadata> offsets) {
// TODO: Dedupe committing the same offsets to the same partitions
OffsetCommitRequestState request = new OffsetCommitRequestState(
offsets,
groupState.groupId,
groupState.groupInstanceId.orElse(null),
groupState.generation);
unsentOffsetCommits.add(request);
- return request.future();
+ return request.future;
}
/**
- * <p>Adding an offset fetch request to the outgoing buffer. If the
same request was made, we chain the future
- * to the existing one.
+ * <p>Adding an offset fetch request to the outgoing buffer. If the
same request was made, we chain the future
+ * to the existing one.
*
- * <p>If the request is new, it invokes a callback to remove itself
from the {@code inflightOffsetFetches}
- * upon completion.</>
+ * <p>If the request is new, it invokes a callback to remove itself
from the {@code inflightOffsetFetches}
+ * upon completion.</>
Review Comment:
nit: wrong tag </> and other unclosed ones above
--
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]