lhotari commented on code in PR #25681:
URL: https://github.com/apache/pulsar/pull/25681#discussion_r3207261826
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/InMemoryDelayedDeliveryTracker.java:
##########
@@ -122,21 +122,29 @@ private static long trimLowerBit(long timestamp, int
bits) {
}
@Override
- public boolean addMessage(long ledgerId, long entryId, long deliverAt) {
+ public synchronized boolean addMessage(long ledgerId, long entryId, long
deliverAt) {
Review Comment:
to keep the performance characteristics of the previous implementation, it
would be necessary to use
`synchronized (dispatcher) { ... }` blocks instead of making the methods
`synchronized`. Java will make that a no-op when the thread already holds the
dispatcher's lock which is the current design.
--
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]