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



##########
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:
       Sure! In previous implementation, only timeseries fullpath is written 
into mod file. 
   E.g. the deletion path is "_root.sg.d1.*_" and d1 has N measurements, we 
have to access mod file N times to record all the fullpaths.
   For now, we record "_root.sg.d1.*_" into mod file only once.




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