SpriCoder commented on code in PR #8647:
URL: https://github.com/apache/iotdb/pull/8647#discussion_r1058988088


##########
confignode/src/main/java/org/apache/iotdb/confignode/manager/cq/CQScheduleTask.java:
##########
@@ -216,6 +204,18 @@ public AsyncExecuteCQCallback(long startTime, long 
endTime) {
       this.endTime = endTime;
     }
 
+    private void updateExecutionTime() {
+      if (timeoutPolicy == TimeoutPolicy.BLOCKED) {
+        executionTime = executionTime + everyInterval;
+      } else if (timeoutPolicy == TimeoutPolicy.DISCARD) {
+        long now = System.currentTimeMillis();
+        executionTime =
+            executionTime + ((now - executionTime - 1) / everyInterval + 1) * 
everyInterval;
+      } else {
+        throw new IllegalArgumentException("Unknown TimeoutPolicy: " + 
timeoutPolicy);
+      }
+    }
+

Review Comment:
   Get it!



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