coderzc commented on code in PR #17092:
URL: https://github.com/apache/pulsar/pull/17092#discussion_r946806761


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/InMemoryDelayedDeliveryTracker.java:
##########
@@ -99,7 +100,7 @@ private long getCutoffTime() {
     }
 
     @Override
-    public boolean addMessage(long ledgerId, long entryId, long deliverAt) {
+    public synchronized boolean addMessage(long ledgerId, long entryId, long 
deliverAt) {

Review Comment:
   I think it is best to use the same lock as `getScheduledMessages`. Keep use 
`synchronized(dispatcher)`?



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to