DanielWang2035 commented on code in PR #15265:
URL: https://github.com/apache/iotdb/pull/15265#discussion_r2055305871


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ModificationUtils.java:
##########
@@ -404,16 +403,18 @@ public static List<ModEntry> sortAndMerge(List<ModEntry> 
modifications) {
   }
 
   public static boolean isDeviceDeletedByMods(
-      Collection<ModEntry> currentModifications, ITimeIndex currentTimeIndex, 
IDeviceID device)
+      final Collection<ModEntry> currentModifications,
+      final ITimeIndex currentTimeIndex,
+      final IDeviceID device)
       throws IllegalPathException {
-    if (currentTimeIndex == null) {
-      return false;
-    }
-    Optional<Long> startTime = currentTimeIndex.getStartTime(device);
-    Optional<Long> endTime = currentTimeIndex.getEndTime(device);
-    if (startTime.isPresent() && endTime.isPresent()) {
-      return isAllDeletedByMods(currentModifications, device, startTime.get(), 
endTime.get());
-    }
-    return false;
+    return isAllDeletedByMods(

Review Comment:
   Will the logic be different from the former version when either startTime or 
endTime is not present?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to