adutra commented on code in PR #4677:
URL: https://github.com/apache/polaris/pull/4677#discussion_r3383940455
##########
runtime/service/src/main/java/org/apache/polaris/service/events/listeners/inmemory/InMemoryBufferEventListener.java:
##########
@@ -72,23 +75,7 @@ protected void processEvent(String realmId, PolarisEvent
event) {
@PreDestroy
public void shutdown() {
-
processors.asMap().values().forEach(InMemoryBufferEventListener::completeSynchronized);
- processors.invalidateAll(); // doesn't call the eviction listener
- }
-
- /**
- * Calls {@link UnicastProcessor#onComplete()} while holding the processor's
intrinsic monitor.
- *
- * <p>smallrye-mutiny's {@code UnicastProcessor.onNext} is method-{@code
synchronized} on the
- * processor instance; {@code onComplete} is not. Acquiring the same
intrinsic monitor here
- * restores symmetric mutual exclusion between concurrent {@code onNext}
(from {@code
- * processEvent}) and {@code onComplete} (from eviction or shutdown).
Wrapping the pattern as an
- * invariant keeps the synchronization requirement structurally visible to
future maintainers.
- */
- private static void completeSynchronized(UnicastProcessor<?> processor) {
Review Comment:
We don't need this method anymore since there is only one call site left.
--
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]