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



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
##########
@@ -230,20 +233,27 @@ public ReadOnlyMemChunk query(String deviceId, String 
measurement, TSDataType da
   }
 
   @Override
-  public void delete(String deviceId, String measurementId, long 
startTimestamp, long endTimestamp) {
-    Map<String, IWritableMemChunk> deviceMap = memTableMap.get(deviceId);
-    if (deviceMap != null) {
-      IWritableMemChunk chunk = deviceMap.get(measurementId);
-      if (chunk == null) {
-        return;
-      }
-      // If startTimestamp == Long.MIN_VALUE && endTimestamp == Long.MAX_VALUE,
-      // it means that the whole timeseries is deleted
-      if (startTimestamp == Long.MIN_VALUE && endTimestamp == Long.MAX_VALUE) {
-        deviceMap.remove(measurementId);
+  public void delete(PartialPath originalPath, PartialPath devicePath, long 
startTimestamp, long endTimestamp) {
+    Map<String, IWritableMemChunk> deviceMap = 
memTableMap.get(devicePath.getFullPath());
+    if (deviceMap == null) {
+      return;
+    }
+    if (originalPath.getNodes().length <= devicePath.getNodes().length ||

Review comment:
       Oh, I forgot the delete range check. Fixed, 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:
[email protected]


Reply via email to