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/28 15:08:43 UTC

[GitHub] [pulsar] lhotari opened a new pull request #10740: [ML] Fix solution for preventing race conditions between timeout and completion

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


   ### Motivation
   
   It seem that the solution for preventing race conditions between timeout and completion doesn't work.
   The repro case in #10738 can reproduce this problem.
   
   ### Modifications
   
   This small modification: 
   `ADD_OP_COUNT_UPDATER.compareAndSet(this, this.addOpCount, -1)` -> `ADD_OP_COUNT_UPDATER.compareAndSet(this, addOpCount, -1)` .
   
   It seems that passing `this.addOpCount` to the second argument wouldn't make sense. The method also contains a `addOpCount` variable which is unused. Therefore it seems that the actual intention has been to use the `addOpCount` local variable instead of the `addOpCount` field. 
   
   ### Additional context
   
   Original solution was added in #4455.


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



[GitHub] [pulsar] eolivelli merged pull request #10740: [ML] Fix solution for preventing race conditions between timeout and completion

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


   


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