ibessonov commented on code in PR #937:
URL: https://github.com/apache/ignite-3/pull/937#discussion_r930667065


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java:
##########
@@ -543,9 +554,13 @@ public void onSnapshotSave(SnapshotWriter writer, Closure 
done) {
                     if (res == null) {
                         File file = new File(writer.getPath());
 
-                        for (File file0 : file.listFiles()) {
-                            if (file0.isFile()) {
-                                writer.addFile(file0.getName(), null);
+                        File[] snapshotFiles = file.listFiles();
+
+                        if (snapshotFiles != null) {

Review Comment:
   Pointing snapshot directory to data directory causes folder scan it in this 
particular method and calling "addFile" for each file. But, there are only data 
files from the underlying storage there.
   All these actions are not needed, with current design all that we do is 
trigger checkpoint and wait. There's no files management.
   What I tried to say here - this is intended. Configured snapshot directory 
should be empty or shouldn't exist at all.



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