gaoran10 commented on code in PR #18420:
URL: https://github.com/apache/pulsar/pull/18420#discussion_r1053931530


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/ImmutableBucket.java:
##########
@@ -52,11 +63,29 @@ CompletableFuture<List<DelayedIndex>> 
asyncLoadNextBucketSnapshotEntry(boolean i
 
         return snapshotCreateFuture.thenCompose(__ -> {
             final long bucketId = getAndUpdateBucketId();
-            CompletableFuture<Integer> loadMetaDataFuture = new 
CompletableFuture<>();
+            final CompletableFuture<Integer> loadMetaDataFuture;
             if (isRecover) {
-                // TODO Recover bucket snapshot
+                final long cutoffTime = cutoffTimeSupplier.get();
+                // Load Metadata of bucket snapshot
+                loadMetaDataFuture = 
bucketSnapshotStorage.getBucketSnapshotMetadata(bucketId)
+                        .thenApply(snapshotMetadata -> {
+                    
List<DelayedMessageIndexBucketSnapshotFormat.SnapshotSegmentMetadata> 
metadataList =
+                            snapshotMetadata.getMetadataListList();
+
+                    // Skip all already reach schedule time snapshot segments

Review Comment:
   Ok, thanks.



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