sashapolo commented on code in PR #3042:
URL: https://github.com/apache/ignite-3/pull/3042#discussion_r1452068421
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java:
##########
@@ -855,19 +824,19 @@ private void onSafeTimeAdvanced(HybridTimestamp time) {
}
/**
- * Saves processed Meta Storage revision and corresponding entries to the
Vault.
+ * Saves processed Meta Storage revision to the {@link #appliedRevision}.
*/
- private CompletableFuture<Void> onRevisionApplied(WatchEvent watchEvent) {
+ private CompletableFuture<Void> onRevisionApplied(long revision) {
Review Comment:
1. This method doesn't need to return a future anymore.
2. All it does is assigning a field, I guess we no longer need the busy lock
as well.
##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/WatchProcessor.java:
##########
@@ -173,12 +172,20 @@ public CompletableFuture<Void> notifyWatches(List<Entry>
updatedEntries, HybridT
CompletableFuture<Void>
notifyUpdateRevisionFuture = notifyUpdateRevisionListeners(newRevision);
CompletableFuture<Void> notificationFuture =
allOf(notifyWatchesFuture, notifyUpdateRevisionFuture)
- .thenAcceptAsync(
- unused ->
invokeOnRevisionCallback(newRevision, time),
+ .thenRunAsync(
+ () ->
invokeOnRevisionCallback(newRevision, time),
watchExecutor
);
- notificationFuture.whenComplete((unused, e) ->
maybeLogLongProcessing(updatedEntries, startTimeNanos));
+ notificationFuture.whenComplete((unused, e) ->
{
+ maybeLogLongProcessing(updatedEntries,
startTimeNanos);
+
+ if (e != null) {
+ LOG.error("Error occurred when
notifying watches", e);
+
+ throw new CompletionException(e);
Review Comment:
This `throw` is redundant, it won't be propagated anywhere
--
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]