You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/08 06:00:20 UTC

[GitHub] [pulsar] coderzc commented on a diff in pull request #17344: [feat][broker][PIP-195] New bucket based delayed message tracker - interface&config&proto -part 1

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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/InMemoryDelayedDeliveryTracker.java:
##########
@@ -273,10 +274,10 @@ public void run(Timeout timeout) throws Exception {
 
     @Override
     public void close() {
-        priorityQueue.close();
         if (timeout != null) {
             timeout.cancel();
         }
+        priorityQueue.close();

Review Comment:
   The timer task may have been used `priorityQueue`, if close `priorityQueue` before cancel the task, then it will throw NPE.



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

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