File tree Expand file tree Collapse file tree
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,9 @@ private CompletableFuture<List<DelayedIndex>> asyncLoadNextBucketSnapshotEntry(b
140140 List <DelayedIndex > indexList = snapshotSegment .getIndexesList ();
141141 this .setCurrentSegmentEntryId (nextSegmentEntryId );
142142 if (isRecover ) {
143- return this .asyncUpdateSnapshotLength ().thenApply (__ -> indexList );
143+ return this .asyncUpdateSnapshotLength ()
144+ .thenAccept (this ::setSnapshotLength )
145+ .thenApply (__ -> indexList );
144146 }
145147 return CompletableFuture .completedFuture (indexList );
146148 });
@@ -247,8 +249,6 @@ protected CompletableFuture<Long> asyncUpdateSnapshotLength() {
247249 .attr ("bucketKey" , bucketKey ())
248250 .exception (ex )
249251 .log ("Failed to get snapshot length" );
250- } else {
251- setSnapshotLength (length );
252252 }
253253 });
254254 }
You can’t perform that action at this time.
0 commit comments