Carry operator cache-reuse status to the frontend
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Task Summary
Part of #5881 (design: #5880).
Carry whether an operator's results were reused from the cache to the frontend. A reused operator reports COMPLETED like any other finished operator: every place that checks operator state treats the two the same way, so no new state is added (settled in #5880). Reuse travels as one extra flag next to the metrics. Nothing sets the flag yet (the scheduler task #5884 does), so this changes no behavior on its own.
**Scope**
- A `reused_from_cache` boolean on `OperatorMetrics`, false by default.
- A logical operator counts as reused only when all of its physical operators are. A partially reused operator, such as a HashJoin whose build side is reused while its probe side runs, reports false; the per-port detail comes from the cache entries.
- The operator statistics websocket event and the frontend `OperatorStatistics` type carry the flag.
**Why this is safe.** The flag is false unless something sets it, and nothing does yet, so every operator reports exactly what it reports today. Operator states are unchanged.
**Notes.** The flag is in a `.proto` file; generated protobuf code is not committed, so the change ships the `.proto` edit only.
**Depends on.** None.
**Out of scope.** Setting the flag, and the statistics of a region that did not run (#5884). Showing reuse in the UI (#5886).
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [ ] Testing / QA
- [ ] Documentation
- [ ] Performance
- [x] Other
Contributor guide
Assessment
This issue has not been assessed yet.