rpuch commented on code in PR #2473:
URL: https://github.com/apache/ignite-3/pull/2473#discussion_r1311776266


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/incoming/IncomingSnapshotCopier.java:
##########
@@ -215,6 +249,28 @@ private CompletableFuture<?> loadSnapshotMeta(ClusterNode 
snapshotSender) {
         }
     }
 
+    private boolean metadataIsSufficientlyComplete() {
+        return 
partitionSnapshotStorage.catalogService().latestCatalogVersion() >= 
snapshotMeta.requiredCatalogVersion();
+    }
+
+    private void logMetadataIsInsufficiencyAndSetError() {
+        LOG.warn(
+                "Metadata not yet available, URI '{}', required level {}; 
rejecting snapshot installation.",
+                this.snapshotUri,
+                snapshotMeta.requiredCatalogVersion()
+        );
+
+        String errorMessage = String.format(
+                "Metadata not yet available, URI '%s', required level %s; 
rejecting snapshot installation.",
+                this.snapshotUri,
+                snapshotMeta.requiredCatalogVersion()
+        );
+
+        if (isOk()) {

Review Comment:
   It's something completely different. 'If there is no error registered yet, 
register an error; otherwise leave an earlier error to not overwrite it'. To be 
honest, I don't see what should be commented here: 'if still no error, raise 
error status'? But is seems obvious from the code :)



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