m1a2st commented on code in PR #21379:
URL: https://github.com/apache/kafka/pull/21379#discussion_r2879135421


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/Cleaner.java:
##########
@@ -302,19 +327,26 @@ public void cleanSegments(UnifiedLog log,
      * @param upperBoundOffsetOfCleaningRound Next offset of the last batch in 
the source segment
      * @param stats Collector for cleaning statistics
      * @param currentTime The time at which the clean was initiated
+     * @param log The log instance for creating new segments if overflow occurs
+     *
+     * @return The current active destination segment (maybe different from 
input dest if overflow occurred)

Review Comment:
   Thanks for the feedback! I agree this is a cleaner design. I've updated 
`cleanInto()` to accept a starting position and throw an exception containing 
the current position on overflow. The caller then creates a new destination 
segment and resumes cleaning from where it left off.



-- 
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]

Reply via email to