You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "AndrewJSchofield (via GitHub)" <gi...@apache.org> on 2026/07/23 09:02:25 UTC

Re: [PR] KAFKA-20723: Bound decompression memory in ShareGroupDLQRecordFetcher [kafka]

AndrewJSchofield commented on code in PR #22905:
URL: https://github.com/apache/kafka/pull/22905#discussion_r3636706253


##########
server/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQRecordFetcher.java:
##########
@@ -197,19 +236,163 @@ private long collect(long readFrom, LogReadResult logReadResult) {
 
     /**
      * Adds the records within the requested range to the map and returns the offset to read from next
-     * (never moves backwards). Records below readFrom or above endOffset are ignored.
+     * (never moves backwards). Records below readFrom or above endOffset are ignored. Sets {@link #aborted}
+     * and stops early if the decompression budget ({@link #maxDecompressedBytes}) is exhausted.

Review Comment:
   What does the return value here actually signify? It looks like the next offset to be read, but I wonder what the `if (record.offset() > endOffset) return nextOffset` logic achieves. The next offset doesn't advance in that case, which seems unintuitive.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org