visit2rahul opened a new pull request, #4577:
URL: https://github.com/apache/polaris/pull/4577

   Follow-up to #4498. That change guarded onComplete() with synchronized 
(processor), which only
   holds because Mutiny's UnicastProcessor.onNext happens to be synchronized on 
the same monitor.
   As @adutra pointed out, that leans on a Mutiny implementation detail - if a 
future version
   locked differently, the guard would quietly stop doing anything.
   
   This gives InMemoryBufferEventListener its own lock instead: an 
EventProcessor wraps each
   UnicastProcessor with a ReentrantLock, and onNext/onComplete go through it - 
no more dependence
   on how Mutiny locks internally. It follows the shape he sketched on #4498.
   
   Two small changes from that sketch, both commented inline:
   - construction goes through a createProcessor method, not 
EventProcessor::new.
   - added a @VisibleForTesting reset() so the tests can reuse the bean after 
shutdown().
   
   Existing InMemoryBufferEventListener tests pass.
   
   Closes #4572
   
   @adutra please review and let me know your thoughts.


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