You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "315157973 (via GitHub)" <gi...@apache.org> on 2023/02/27 11:43:16 UTC

[GitHub] [pulsar] 315157973 commented on a diff in pull request #19577: [improve][broker] Make BucketDelayedDeliveryTracker can retry snapshot operation & improve logs

315157973 commented on code in PR #19577:
URL: https://github.com/apache/pulsar/pull/19577#discussion_r1116572210


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/Bucket.java:
##########
@@ -54,17 +54,18 @@ abstract class Bucket {
 
     int lastSegmentEntryId;
 
-    int currentSegmentEntryId;
+    volatile int currentSegmentEntryId;
 
-    long snapshotLength;
+    volatile long snapshotLength;
 
     private volatile Long bucketId;
 
     private volatile CompletableFuture<Long> snapshotCreateFuture;
 
 
-    Bucket(ManagedCursor cursor, BucketSnapshotStorage storage, long startLedgerId, long endLedgerId) {
-        this(cursor, storage, startLedgerId, endLedgerId, new HashMap<>(), -1, -1, 0, 0, null, null);
+    Bucket(PersistentDispatcherMultipleConsumers dispatcher,

Review Comment:
   Why change to dispatch, just to get the name of dispatch and print log?



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BookkeeperBucketSnapshotStorage.java:
##########
@@ -154,7 +154,7 @@ private CompletableFuture<LedgerHandle> createLedger(String bucketKey) {
                 LedgerPassword,
                 (rc, handle, ctx) -> {
                     if (rc != BKException.Code.OK) {
-                        future.completeExceptionally(bkException("Failed to create ledger", rc, -1));
+                        future.completeExceptionally(bkException("Create ledger", rc, -1));

Review Comment:
   Why modify these logs, the previous description looks more accurate



-- 
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: commits-unsubscribe@pulsar.apache.org

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