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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BucketDelayedDeliveryTracker.java:
##########
@@ -306,7 +308,19 @@ private synchronized CompletableFuture<Void> 
asyncMergeBucketSnapshot() {
                 minIndex = i;
             }
         }
-        return asyncMergeBucketSnapshot(values.get(minIndex), 
values.get(minIndex + 1));
+        ImmutableBucket immutableBucketA = values.get(minIndex);
+        ImmutableBucket immutableBucketB = values.get(minIndex + 1);
+        log.info("[{}] Merging bucket snapshot, bucketAKey: {}, bucketBKey: 
{}", dispatcher.getName(),

Review Comment:
   We should change to debug level since it will make a lot of noise if you 
have many topics on the broker.



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BucketDelayedDeliveryTracker.java:
##########
@@ -392,16 +406,12 @@ public synchronized NavigableSet<PositionImpl> 
getScheduledMessages(int maxMessa
 
             long ledgerId = sharedBucketPriorityQueue.peekN2();
             long entryId = sharedBucketPriorityQueue.peekN3();
-            positions.add(new PositionImpl(ledgerId, entryId));
-
-            sharedBucketPriorityQueue.pop();
-            removeIndexBit(ledgerId, entryId);
 
             ImmutableBucket bucket = 
snapshotSegmentLastIndexTable.remove(ledgerId, entryId);
             if (bucket != null && 
immutableBuckets.asMapOfRanges().containsValue(bucket)) {
-                if (log.isDebugEnabled()) {
-                    log.debug("[{}] Load next snapshot segment, bucket: {}", 
dispatcher.getName(), bucket);
-                }
+                final int lastSegmentEntryId = bucket.currentSegmentEntryId;
+                log.info("[{}] Loading next bucket snapshot segment, 
bucketKey: {}, nextSegmentEntryId: {}",

Review Comment:
   Why change to debug level?



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