Skip to content

Commit 9ee5160

Browse files
committed
Fix test
1 parent 30b06a0 commit 9ee5160

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/ImmutableBucket.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)