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 2018/11/18 21:36:02 UTC

[GitHub] tedyu commented on issue #2973: Fix NPE caused by the race condition

tedyu commented on issue #2973: Fix NPE caused by the race condition
URL: https://github.com/apache/pulsar/pull/2973#issuecomment-439727900
 
 
   I think activateCursor should also be synchronized.
   Otherwise the following sequence may happenL:
   
   1. activateCursor finds null return from activeCursors.get call
   2. deactivateCursor runs and sees activeCursors.isEmpty() being true
   3. activateCursor adds cursor
   4. deactivateCursor clears entryCache

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services