chia7712 commented on code in PR #19613:
URL: https://github.com/apache/kafka/pull/19613#discussion_r2071044004


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java:
##########
@@ -2416,15 +2416,15 @@ public static void 
rebuildProducerState(ProducerStateManager producerStateManage
                                             Time time,
                                             boolean reloadFromCleanShutdown,
                                             String logPrefix) throws 
IOException {
-        List<Optional<Long>> offsetsToSnapshot = new ArrayList<>();
+        List<Long> offsetsToSnapshot = new ArrayList<>();
         if (segments.nonEmpty()) {

Review Comment:
   Could you please consider using `segments.lastSegment().ifPresent` to 
rewrite it?



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to