You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/01/21 06:22:25 UTC

[GitHub] [iotdb] neuyilan commented on a change in pull request #2533: fix the bug that when introduce the virtual sg, the path not consist with the tsfile's in snapshot

neuyilan commented on a change in pull request #2533:
URL: https://github.com/apache/iotdb/pull/2533#discussion_r561628353



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/snapshot/FileSnapshot.java
##########
@@ -430,24 +427,20 @@ private void loadRemoteResource(RemoteTsFileResource resource) throws IllegalPat
     private File pullRemoteFile(RemoteTsFileResource resource, Node node) throws IOException {
       logger.info("{}: pulling remote file {} from {}, plan index [{}, {}]", name, resource, node
           , resource.getMinPlanIndex(), resource.getMaxPlanIndex());
-
-      String[] pathSegments = FilePathUtils.splitTsFilePath(resource);
-      int segSize = pathSegments.length;
       // the new file is stored at:
-      // remote/<nodeIdentifier>/<storageGroupName>/<partitionNum>/<fileName>
+      // remote/<nodeIdentifier>/resource.getTsFile().getAbsolutePath()

Review comment:
       The path may change, so I put all the annotation in the` splitTsFilePath()` method in FilePathUtils to reduce dispersion so that such bugs occur less often




----------------------------------------------------------------
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:
users@infra.apache.org