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 2021/08/23 12:07:00 UTC

[GitHub] [pulsar] lhotari opened a new pull request #11749: [Broker] Handle NPE and memory leak when full key range isn't covered with active consumers

lhotari opened a new pull request #11749:
URL: https://github.com/apache/pulsar/pull/11749


   ### Motivation
   
   When reading through the broker implementation for Key_shared I spotted an issue when the full key range isn't covered with active consumers. This would result in a NullPointerException and a memory leak since the buffer for the ManagedLedger Entry wouldn't be released.
   
   ### Modifications
   
   Add null check and release entry when selected consumer is null.


-- 
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] merlimat merged pull request #11749: [Broker] Handle NPE and memory leak when full key range isn't covered with active consumers

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


   


-- 
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] BewareMyPower commented on pull request #11749: [Broker] Handle NPE and memory leak when full key range isn't covered with active consumers

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


   I approved first but have a suggestion that is not required. Should we also update the JavaDoc of `select` method to note that it could return null? Though the better practice may be using `@NonNull` annotation for those methods that should never return null, I found this annotation is not widely use in current source code.
   


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