Explorar el Código

ES|QL: pin 'now' as query start time (#113777) (#113879)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Luigi Dell'Aquila hace 1 año
padre
commit
fdef965075

+ 1 - 3
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/Configuration.java

@@ -171,11 +171,9 @@ public class Configuration implements Writeable {
     /**
      * Returns the current time in milliseconds from the time epoch for the execution of this request.
      * It ensures consistency by using the same value on all nodes involved in the search request.
-     * Note: Currently, it returns {@link System#currentTimeMillis()}, but this value will be serialized between nodes.
      */
     public long absoluteStartedTimeInMillis() {
-        // MP TODO: I'm confused - Why is this not a fixed value taken at the start of the query processing?
-        return System.currentTimeMillis();
+        return now.toInstant().toEpochMilli();
     }
 
     /**