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/05/04 16:26:37 UTC

[GitHub] [pulsar] dlg99 commented on issue #10433: NPE in broker: EntryImpl.getLength()

dlg99 commented on issue #10433:
URL: https://github.com/apache/pulsar/issues/10433#issuecomment-832074255


   @lhotari Let me poke into this theory: 
   
   Initial refCnt of the entry in cache == 1
   
   > one thread reads entries from the cache. the entries get marked for use with the value.retain(); call (line 115 in RangeCache).
   
   A: value.retain() succeeds: refCnt++ == 2
   B: value.retain() throws (other thread released it already somehow): entry is not returned.
   
   > in the meantime, the cache entry gets invalidated and invalidation calls release() for the entry
   
   A: refCnt-- ==  1
   B: entry was not returned, could not be used
   
   "the EntryImpl instance gets returned to the Recycler object pool" does not happen in case A.
   
   Did I miss something there?
   


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

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