BUAAserein commented on code in PR #12293:
URL: https://github.com/apache/iotdb/pull/12293#discussion_r1561966928


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/IoTConsensusServerImpl.java:
##########
@@ -591,23 +607,11 @@ public void removeSyncLogChannel(Peer targetPeer) throws 
ConsensusGroupModifyPee
     }
   }
 
-  // TODO: persist first and then delete old configuration file
   public void persistConfiguration() {
     try {
-      try (Stream<Path> stream = Files.walk(Paths.get(storageDir))) {
-        stream
-            .filter(Files::isRegularFile)
-            .filter(filePath -> 
filePath.getFileName().toString().contains("configuration"))
-            .forEach(
-                filePath -> {
-                  try {
-                    Files.delete(filePath);
-                  } catch (IOException e) {
-                    logger.error("Unexpected error occurs when deleting old 
configuration file", e);
-                  }
-                });
-      }
       serializeConfigurationAndFsyncToDisk();

Review Comment:
   add rename



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