You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/18 11:25:32 UTC

[GitHub] [kafka] dengziming commented on a change in pull request #10085: KAFKA-12154: Snapshot Loading API

dengziming commented on a change in pull request #10085:
URL: https://github.com/apache/kafka/pull/10085#discussion_r578339086



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -321,6 +335,23 @@ private void updateListenersProgress(List<ListenerContext> listenerContexts, lon
         }
     }
 
+    private Optional<SnapshotReader<T>> oldestSnapshot() {
+        if (log.oldestSnapshotId().isPresent()) {

Review comment:
       nit: we can use `log.oldestSnapshotId().map(oldestSnapshotId -> {...})` to get rid of if `else`




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

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