tkalkirill commented on code in PR #6199: URL: https://github.com/apache/ignite-3/pull/6199#discussion_r2191862888
########## modules/metastorage/src/test/java/org/apache/ignite/internal/metastorage/server/WatchProcessorTest.java: ########## @@ -288,6 +289,48 @@ void nodeStoppingExceptionDoesNotTriggerFailureManager() { verify(failureManager, never()).process(any()); } + @Test + void eventNotificationUpdatesMetastoreSafeTimeAfterNotifyingWatchListeners() { + CompletableFuture<Void> listenerFuture = new CompletableFuture<>(); + WatchListener listener = mock(WatchListener.class); + when(listener.onUpdate(any())).thenReturn(listenerFuture); + + watchProcessor.addWatch(new Watch(0, listener, key -> Arrays.equals(key, "foo".getBytes(UTF_8)))); + + var entry1 = new EntryImpl("foo".getBytes(UTF_8), null, 1, TIMESTAMP); + HybridTimestamp ts = new HybridTimestamp(1, 2); + + watchProcessor.notifyWatches(1, List.of(entry1), ts); + + verify(watchEventHandlingCallback, timeout(100).times(0)).onSafeTimeAdvanced(any()); + + listenerFuture.complete(null); + + verify(watchEventHandlingCallback, timeout(SECONDS.toMillis(10))).onSafeTimeAdvanced(ts); + } + + @Test + void metastoreSafeTimeGetsAdvancedAfterPreviousNotificationChainMembesAreFinished() { + CompletableFuture<Void> listenerFuture = new CompletableFuture<>(); + WatchListener listener = mock(WatchListener.class); + when(listener.onUpdate(any())).thenReturn(listenerFuture); + + watchProcessor.addWatch(new Watch(0, listener, key -> Arrays.equals(key, "foo".getBytes(UTF_8)))); + + var entry1 = new EntryImpl("foo".getBytes(UTF_8), null, 1, TIMESTAMP); + HybridTimestamp entryTs = new HybridTimestamp(1, 2); Review Comment: Ok ########## modules/network-api/src/main/java/org/apache/ignite/internal/network/MessagingService.java: ########## @@ -34,7 +34,7 @@ public interface MessagingService { * Send the given message asynchronously to the specific member without any delivery guarantees. * * @param recipient Recipient of the message. - * @param msg Message which should be delivered. + * @param msg Message which should be delivered. Review Comment: I don't insist. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org