Skip to content

Commit

Permalink
ES|QL: pin 'now' as query start time (elastic#113777)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigidellaquila authored Oct 1, 2024
1 parent 852c960 commit ee73969
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,9 @@ public String query() {
/**
* 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();
}

/**
Expand Down

0 comments on commit ee73969

Please sign in to comment.