chirag-wadhwa5 commented on code in PR #16456:
URL: https://github.com/apache/kafka/pull/16456#discussion_r1701409939
##########
core/src/test/java/kafka/server/share/SharePartitionManagerTest.java:
##########
@@ -133,7 +133,7 @@ public void testNewContextReturnsFinalContext() {
SharePartitionManager sharePartitionManager =
SharePartitionManagerBuilder.builder().build();
ShareFetchMetadata newReqMetadata = new
ShareFetchMetadata(Uuid.ZERO_UUID, -1);
- ShareFetchContext shareFetchContext =
sharePartitionManager.newContext("grp", Collections.emptyMap(),
Collections.emptyList(), newReqMetadata);
+ ShareFetchContext shareFetchContext =
sharePartitionManager.newContext("grp", Collections.emptyMap(),
Collections.emptyList(), newReqMetadata, true);
Review Comment:
Thanks for the review ! During the invocation of
`sharePartitionManager.newContext` we don't pass any acknowledgements, so
there's no way to know whether acknowledgements are present or not, only the
variable `isAcknowledgeDataPresent` provides that information. My understanding
says that in the general case, only the first fetch request (with request epoch
0) will not contain any acknowledgements, but all the subsequent requests
would. Going by that logic, I have set this variable to false in case request
epoch is 0, and true in all the other cases.
--
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]