Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog/132260.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 132260
summary: FIx Driver creating status with a live list of operators
area: ES|QL
type: bug
issues:
- 131564
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ private void updateStatus(long extraCpuNanos, int extraIterations, DriverStatus.
prev.cpuNanos() + extraCpuNanos,
prev.iterations() + extraIterations,
status,
statusOfCompletedOperators,
new ArrayList<>(statusOfCompletedOperators),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably do List.copyOf here, but this is fine.

I think it's worth a comment that we always update the statusOfCompletedOperators list in this thread, but we read it in many threads.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the suggestion, and a test.

About the statusOfCompletedOperators, after this change, it's never read outside of the updateStatus()

activeOperators.stream().map(op -> new OperatorStatus(op.toString(), op.status())).toList(),
sleeps
);
Expand Down