heesung-sn commented on code in PR #20951:
URL: https://github.com/apache/pulsar/pull/20951#discussion_r1286643542
##########
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:
Seems like this snapshot can be called from other threads too. We better not
overflow logs.
--
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]