You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by xi...@apache.org on 2026/06/02 04:31:50 UTC
(texera) 21/47: feat(cache): update worker number display.
This is an automated email from the ASF dual-hosted git repository.
Xiao-zhen-Liu pushed a commit to branch xiaozhen-caching-prototype
in repository https://gitbox.apache.org/repos/asf/texera.git
commit 66421a56e3cbf2539a4150f655dc94cdd74d3dd2
Author: Xiaozhen Liu <xi...@uci.edu>
AuthorDate: Wed Jan 14 14:40:42 2026 -0800
feat(cache): update worker number display.
---
docs/operator-port-cache.md | 4 +++-
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/docs/operator-port-cache.md b/docs/operator-port-cache.md
index de3b0471bd..0ffaa2f826 100644
--- a/docs/operator-port-cache.md
+++ b/docs/operator-port-cache.md
@@ -119,7 +119,7 @@ Entry point: `RegionExecutionCoordinator` constructor branches on `region.cached
- `numWorkers = 0`
- `dataProcessingTime = 0`, `controlProcessingTime = 0`, `idleTime = 0`
- Input/output tuple counts from cached metadata
- - **UI**: The graph view displays `-` for cached input counts and for cached output ports that were not materialized.
+ - **UI**: The graph view displays `-` for cached input counts and for cached output ports that were not materialized; worker counts show `from cache`.
- **Note**: Cached stats are synthetic (inputs default to 0; non-materialized outputs may be omitted). Do not use them for cost modeling until we add explicit tagging/filtering in `runtime_statistics`.
5. **Propagate cached URIs**: Downstream operators receive cached `result_uri` for materialized inputs
6. **No WorkerAssignmentUpdate**: Cached regions don't send worker assignment events (consistent with numWorkers=0)
@@ -302,6 +302,7 @@ ExecutionCacheService ────→ upsertCachedOutput() OperatorPortCache
- Frontend `OperatorState` enum includes `CompletedFromCache`
- Operator visualization: blue fill color (`#1890ff`) for cached operators in `joint-ui.service.ts`
- Port metrics display: cached input counts show `-`, and cached output ports without materialization show `-`
+ - Worker count label: cached operators show `from cache` instead of `#workers`
- Region visualization: blue fill (`rgba(24,144,255,0.3)`) for cached regions in `workflow-editor.component.ts`
- Region visibility: shared state via `WorkflowActionService.showRegion` ensures correct visibility when regions are created during execution
@@ -421,6 +422,7 @@ The cache system integrates with three layers:
- [x] Add blue fill for cached regions in `workflow-editor.component.ts`
- Color: `rgba(24,144,255,0.3)` (translucent blue)
- [x] Show `-` for cached input counts and cached output ports without materialization
+- [x] Replace cached worker count label with `from cache`
- [x] Fix region visibility with shared state via `WorkflowActionService.showRegion`
- Ensures regions show correctly when user toggles visibility before execution
diff --git a/frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts b/frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts
index a07606611f..d89624a2c8 100644
--- a/frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts
+++ b/frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts
@@ -320,11 +320,12 @@ export class JointUIService {
const inputMetrics = statistics.inputPortMetrics;
const outputMetrics = statistics.outputPortMetrics;
- // Cached operators show "-" for inputs and non-materialized outputs.
+ // Cached operators show "-" for inputs and non-materialized outputs, and label workers as "from cache".
const isSkippedFromCache = statistics.operatorState === OperatorState.CompletedFromCache;
const workerCount = statistics.numWorkers ?? 1;
- element.attr(`.${operatorWorkerCountClass}/text`, "#workers: " + String(workerCount));
+ const workerCountLabel = isSkippedFromCache ? "from cache" : "#workers: " + String(workerCount);
+ element.attr(`.${operatorWorkerCountClass}/text`, workerCountLabel);
inPorts.forEach(portDef => {
const portId = portDef.id;