Skip to content

Commit

Permalink
Update execution info at end of planning before kicking off execution…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
quux00 authored Oct 19, 2024
1 parent ac25dbe commit b2a2a53
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public void executeOptimizedPlan(
) {
LogicalPlan firstPhase = Phased.extractFirstPhase(optimizedPlan);
if (firstPhase == null) {
runPhase.accept(logicalPlanToPhysicalPlan(optimizedPlan, request), listener);
updateExecutionInfoAtEndOfPlanning(executionInfo);
runPhase.accept(logicalPlanToPhysicalPlan(optimizedPlan, request), listener);
} else {
executePhased(new ArrayList<>(), optimizedPlan, request, executionInfo, firstPhase, runPhase, listener);
}
Expand Down

0 comments on commit b2a2a53

Please sign in to comment.