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



##########
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:
       I think you also write every mod record into tsfile resource's mod file. 
In jira, you said that 
   ```
   We need to record N*M modifications, which is time consuming. 
   ```
   Could you explain that?   Thanks~




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


Reply via email to