adixitconfluent commented on code in PR #17539:
URL: https://github.com/apache/kafka/pull/17539#discussion_r1815599413
##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -1525,6 +1537,24 @@ private Optional<Throwable> acknowledgeCompleteBatch(
return Optional.empty();
}
+ protected void updateLatestFetchOffsetMetadata(LogOffsetMetadata
fetchOffsetMetadata) {
+ lock.writeLock().lock();
+ try {
+ latestFetchOffsetMetadata = fetchOffsetMetadata;
Review Comment:
IIUC, everytime we fetch new records from `readFromLog`, I utilize the
`LogOffsetMetadata` object from the response to update the
`latestFetchOffsetMetadata` object while doing the acquire. Hence, this way I
have the most recent fetched offset's metadata that I always update through
`acquire` method. Most of the time, it is going to be the endOffset's metadata
itself, as soon as new data is produced to the topic partition. Anything else
that I need to do here?
--
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]