Skip to content

Commit b2a2a53

Browse files
authored
Update execution info at end of planning before kicking off execution phase (#115127)
The revised took time model bug fix #115017 introduced a new bug that allows a race condition between updating the execution info with "end of planning" timestamp and using that timestamp during execution. This one line fix reverses the order to ensure the planning phase execution update occurs before starting the ESQL query execution phase.
1 parent ac25dbe commit b2a2a53

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+1
-1
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ public void executeOptimizedPlan(
162162
) {
163163
LogicalPlan firstPhase = Phased.extractFirstPhase(optimizedPlan);
164164
if (firstPhase == null) {
165-
runPhase.accept(logicalPlanToPhysicalPlan(optimizedPlan, request), listener);
166165
updateExecutionInfoAtEndOfPlanning(executionInfo);
166+
runPhase.accept(logicalPlanToPhysicalPlan(optimizedPlan, request), listener);
167167
} else {
168168
executePhased(new ArrayList<>(), optimizedPlan, request, executionInfo, firstPhase, runPhase, listener);
169169
}

0 commit comments

Comments
 (0)