qiaojialin commented on a change in pull request #1732:
URL: https://github.com/apache/incubator-iotdb/pull/1732#discussion_r497259135



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -1443,13 +1443,15 @@ private void logDeletion(long startTime, long endTime, 
PartialPath deviceId, Str
 
   private void deleteDataInFiles(Collection<TsFileResource> 
tsFileResourceList, Deletion deletion,
       List<ModificationFile> updatedModFiles)
-      throws IOException {
-    String deviceId = deletion.getDevice();
+          throws IOException, MetadataException {
     for (TsFileResource tsFileResource : tsFileResourceList) {
-      if (!tsFileResource.containsDevice(deviceId) ||
-          deletion.getEndTime() < tsFileResource.getStartTime(deviceId) ||
-          deletion.getStartTime() > 
tsFileResource.getOrDefaultEndTime(deviceId, Long.MAX_VALUE)) {
-        continue;
+      for (PartialPath p : 
IoTDB.metaManager.getAllTimeseriesPath(deletion.getPath())) {
+        String deviceId = p.getDevice();
+        if (!tsFileResource.containsDevice(deviceId) ||
+                deletion.getEndTime() < tsFileResource.getStartTime(deviceId) 
||
+                deletion.getStartTime() > 
tsFileResource.getOrDefaultEndTime(deviceId, Long.MAX_VALUE)) {
+          continue;
+        }

Review comment:
       The for (PartialPath p ) statement is of no use. Check the code 
carefully.
   
   insert into root.turbine1.a.d1(timestamp,s1) values(1,1);
   insert into root.turbine1.a.d2(timestamp,s1) values(1,1);
   flush
   insert into root.turbine1.b.d1(timestamp,s1) values(2,1);
   insert into root.turbine1.b.d2(timestamp,s1) values(2,1);
   flush
   delete from root.turbine1 where time < 5
   
   You will record all files a mod.




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


Reply via email to