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/03/15 21:00:10 UTC

[GitHub] [pulsar] michaeljmarshall opened a new pull request #14363: [Broker] Fix NPE when subscription is already removed

michaeljmarshall opened a new pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363


   Master Issue: #14362 
   
   ### Motivation
   
   There is current a race condition when we remove a subscription. The race and how to reproduce it is described in the #14362. One of the consequences of the race is that there is a chance we try to remove the subscription from the topic twice. This leads to an NPE, as described in the issue.
   
   ### Modifications
   
   * Verify that the `sub` is not null before getting its stats.
   
   ### Verifying this change
   
   This is a trivial change.
   
   


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



[GitHub] [pulsar] michaeljmarshall closed pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall closed pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363


   


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



[GitHub] [pulsar] michaeljmarshall merged pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall merged pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363


   


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



[GitHub] [pulsar] michaeljmarshall commented on pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363#issuecomment-1043659704


   I am actually going to propose solving this a different way. Closing for now.


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



[GitHub] [pulsar] michaeljmarshall commented on pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363#issuecomment-1043644603


   This is one of several fixes that I plan to contribute in response to #14363 


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



[GitHub] [pulsar] michaeljmarshall commented on pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363#issuecomment-1068752834


   @merlimat @lhotari @codelipenghui - instead of making a larger change to prevent the null pointer, I think we should get this PR merged so that it can be cherry-picked to affected branches (I still need to figured out which branches are affected), and then I can submit the larger change to target 2.11.


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



[GitHub] [pulsar] michaeljmarshall commented on pull request #14363: [Broker] Fix NPE when subscription is already removed

Posted by GitBox <gi...@apache.org>.
michaeljmarshall commented on pull request #14363:
URL: https://github.com/apache/pulsar/pull/14363#issuecomment-1043655601


   While I haven't seen this behavior for the `NonPersistentTopic`, it seems like the same case, so I added another null check.


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