mattisonchao commented on code in PR #20170:
URL: https://github.com/apache/pulsar/pull/20170#discussion_r1174604488


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BookkeeperBucketSnapshotStorage.java:
##########
@@ -127,7 +127,9 @@ private CompletableFuture<Void> 
addSnapshotSegments(LedgerHandle ledgerHandle,
     private SnapshotMetadata parseSnapshotMetadataEntry(LedgerEntry 
ledgerEntry) {
         try {
             ByteBuf entryBuffer = ledgerEntry.getEntryBuffer();
-            return SnapshotMetadata.parseFrom(entryBuffer.nioBuffer());
+            SnapshotMetadata snapshotMetadata = 
SnapshotMetadata.parseFrom(entryBuffer.nioBuffer());

Review Comment:
   You should add try-finally here to aovid any exception.



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