poorbarcode commented on code in PR #20951:
URL: https://github.com/apache/pulsar/pull/20951#discussion_r1286627064


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/MessageDeduplication.java:
##########
@@ -406,6 +410,11 @@ private void takeSnapshot(Position position) {
         if (log.isDebugEnabled()) {
             log.debug("[{}] Taking snapshot of sequence ids map", 
topic.getName());
         }
+
+        if (!snapshotTaking.compareAndSet(false, true)) {
+            return;

Review Comment:
   Since one updating cursor metadata task has been skipped(maybe the skipped 
one has a larger `position`), shall we print a log?



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