SzyWilliam commented on PR #958:
URL: https://github.com/apache/ratis/pull/958#issuecomment-1797132280

   > BTW, I recently found that atomic operations (e.g. 
AtomicReference/ConcurrentMap) required side-effect-free function; see 
[RATIS-1923](https://issues.apache.org/jira/browse/RATIS-1923). In 
ReadIndexQueue.add(..), the MemoizedSupplier may be initialized a future but 
then discarded by sorted.computeIfAbsent(..) since it keeps retrying in a loop. 
We may fixed it by creating the future in advance
   
   Thanks for the explaination! Now I knows why we should use a 
side-effect-free function!
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to