sashapolo commented on code in PR #5593:
URL: https://github.com/apache/ignite-3/pull/5593#discussion_r2035569060


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/raft/snapshot/PartitionSnapshotStorage.java:
##########
@@ -17,159 +17,103 @@
 
 package org.apache.ignite.internal.partition.replicator.raft.snapshot;
 
+import static it.unimi.dsi.fastutil.ints.Int2ObjectMaps.synchronize;
+
 import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.ignite.internal.catalog.CatalogService;
 import org.apache.ignite.internal.failure.FailureProcessor;
+import org.apache.ignite.internal.network.MessagingService;
 import org.apache.ignite.internal.network.TopologyService;
 import 
org.apache.ignite.internal.partition.replicator.raft.snapshot.incoming.IncomingSnapshotCopier;
 import 
org.apache.ignite.internal.partition.replicator.raft.snapshot.outgoing.OutgoingSnapshotReader;
 import 
org.apache.ignite.internal.partition.replicator.raft.snapshot.outgoing.OutgoingSnapshotsManager;
-import 
org.apache.ignite.internal.partition.replicator.raft.snapshot.startup.StartupPartitionSnapshotReader;
+import org.apache.ignite.internal.raft.RaftGroupConfiguration;
 import org.apache.ignite.internal.storage.MvPartitionStorage;
+import org.apache.ignite.raft.jraft.RaftMessagesFactory;
 import org.apache.ignite.raft.jraft.entity.RaftOutter.SnapshotMeta;
-import org.apache.ignite.raft.jraft.option.RaftOptions;
-import org.apache.ignite.raft.jraft.option.SnapshotCopierOptions;
-import org.apache.ignite.raft.jraft.storage.SnapshotStorage;
-import org.apache.ignite.raft.jraft.storage.SnapshotThrottle;
 import org.apache.ignite.raft.jraft.storage.snapshot.SnapshotCopier;
 import org.apache.ignite.raft.jraft.storage.snapshot.SnapshotReader;
 import org.apache.ignite.raft.jraft.storage.snapshot.SnapshotWriter;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * Snapshot storage for {@link MvPartitionStorage}.
+ * Snapshot storage for {@link MvPartitionStorage}. Utilizes the fact that 
every partition already stores its latest applied index
+ * and thus can itself be used as its own snapshot.
+ *
+ * <p>Uses {@link MvPartitionStorage#lastAppliedIndex()} and configuration, 
passed into constructor, to create a {@link SnapshotMeta} object
+ * in {@link SnapshotReader#load()}.
  *
- * @see PartitionSnapshotStorageFactory
+ * <p>Snapshot writer doesn't allow explicit save of any actual file. {@link 
SnapshotWriter#saveMeta(SnapshotMeta)} simply returns
+ * {@code true}, and {@link SnapshotWriter#addFile(String)} throws an 
exception.
  */
-public class PartitionSnapshotStorage implements SnapshotStorage {
+public class PartitionSnapshotStorage {

Review Comment:
   Why not? It still manages storages wrt snapshots



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

Reply via email to