xtern commented on a change in pull request #9105:
URL: https://github.com/apache/ignite/pull/9105#discussion_r637932432
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java
##########
@@ -184,90 +184,84 @@ protected void cleanup() throws IgniteCheckedException {
return new IgniteFinishedFutureImpl<>(e);
}
-
ctx.cache().context().snapshotMgr().collectSnapshotMetadata(snpName).listen(
- f -> {
- if (f.error() != null) {
- finishProcess(fut0.rqId, f.error());
+ ctx.cache().context().snapshotMgr().checkSnapshot(snpName,
cacheGrpNames).listen(f -> {
+ if (f.error() != null) {
+ finishProcess(fut0.rqId, f.error());
- return;
- }
+ return;
+ }
- Set<UUID> dataNodes = new HashSet<>();
- Set<String> snpBltNodes = null;
- Map<ClusterNode, List<SnapshotMetadata>> metas = f.result();
- Map<Integer, String> reqGrpIds = cacheGrpNames == null ?
Collections.emptyMap() :
-
cacheGrpNames.stream().collect(Collectors.toMap(CU::cacheId, v -> v));
+ if (!F.isEmpty(f.result().exceptions())) {
+ finishProcess(fut0.rqId,
F.firstEntry(f.result().exceptions()).getValue());
Review comment:
```suggestion
finishProcess(fut0.rqId,
F.first(f.result().exceptions().values()));
```
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsVerifyTask.java
##########
@@ -165,13 +175,19 @@
/** Consistent snapshot metadata file name. */
private final String consId;
+ /** Set of cache groups to be checked in the snapshot or {@code empty}
to check everything. */
+ private final Set<String> rqGrps = new HashSet<>();
+
/**
* @param snpName Snapshot name to validate.
* @param consId Consistent snapshot metadata file name.
*/
Review comment:
missing JavaDoc for rqGrps
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotPartitionsVerifyTaskResult.java
##########
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.snapshot;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.dto.IgniteDataTransferObject;
+import org.apache.ignite.internal.processors.cache.verify.IdleVerifyResultV2;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+public class SnapshotPartitionsVerifyTaskResult extends
IgniteDataTransferObject {
Review comment:
javadoc is missing
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]