Repository navigation
Conversation
…per worker Move the dataset FUSE mount out of the per-worker PythonWorkflowWorker up to the region scheduler. RegionExecutionManager.mountRegionDatasets() gathers the deduplicated set of dataset locators across the region's operators and calls DatasetMountManager.ensureAllMounted once, before any worker starts (guarded by an AtomicBoolean so both launch phases mount at most once). The worker now calls DatasetMountManager.resolveMountPath, a pure in-pod lookup with no mount. New: ensureAllMounted (planning/execution) and resolveMountPath (lookup); ensureMounted stays as the idempotent execution primitive. Both new methods carry a "Warning:" comment: the mount executes in the controller's pod and is only correct while the controller and a region's workers share one CU pod; a distributed-worker deployment would dispatch execution to each worker's pod. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LWctadaFS9S8CwMhhVZquv
|
👋 Thanks for opening this pull request, @aicam! It looks like the pull request description doesn't quite follow our template yet:
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed. You can find the template prompts by editing the description, or see CONTRIBUTING.md for the full contribution flow. |
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 393 | 0.24 | 25,297/32,279/32,279 us | 🔴 +18.2% / ⚪ within ±5% |
| 🟢 | bs=100 sw=10 sl=64 | 948 | 0.579 | 103,465/123,135/123,135 us | 🟢 -21.8% / ⚪ within ±5% |
| 🟢 | bs=1000 sw=10 sl=64 | 1,115 | 0.68 | 902,031/924,311/924,311 us | 🟢 -5.6% / ⚪ within ±5% |
Baseline details
Latest main d15b3d1 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 393 tuples/sec | 472 tuples/sec | n/a | -16.7% | n/a |
| bs=10 sw=10 sl=64 | MB/s | 0.24 MB/s | 0.288 MB/s | n/a | -16.7% | n/a |
| bs=10 sw=10 sl=64 | p50 | 25,297 us | 21,408 us | n/a | +18.2% | n/a |
| bs=10 sw=10 sl=64 | p95 | 32,279 us | 29,429 us | n/a | +9.7% | n/a |
| bs=10 sw=10 sl=64 | p99 | 32,279 us | 29,429 us | n/a | +9.7% | n/a |
| bs=100 sw=10 sl=64 | throughput | 948 tuples/sec | 930 tuples/sec | n/a | +1.9% | n/a |
| bs=100 sw=10 sl=64 | MB/s | 0.579 MB/s | 0.567 MB/s | n/a | +2.1% | n/a |
| bs=100 sw=10 sl=64 | p50 | 103,465 us | 103,573 us | n/a | -0.1% | n/a |
| bs=100 sw=10 sl=64 | p95 | 123,135 us | 157,526 us | n/a | -21.8% | n/a |
| bs=100 sw=10 sl=64 | p99 | 123,135 us | 157,526 us | n/a | -21.8% | n/a |
| bs=1000 sw=10 sl=64 | throughput | 1,115 tuples/sec | 1,061 tuples/sec | n/a | +5.1% | n/a |
| bs=1000 sw=10 sl=64 | MB/s | 0.68 MB/s | 0.647 MB/s | n/a | +5.1% | n/a |
| bs=1000 sw=10 sl=64 | p50 | 902,031 us | 945,725 us | n/a | -4.6% | n/a |
| bs=1000 sw=10 sl=64 | p95 | 924,311 us | 978,856 us | n/a | -5.6% | n/a |
| bs=1000 sw=10 sl=64 | p99 | 924,311 us | 978,856 us | n/a | -5.6% | n/a |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,508.91,200,128000,393,0.240,25297.32,32278.58,32278.58
1,100,10,64,20,2108.90,2000,1280000,948,0.579,103464.55,123134.57,123134.57
2,1000,10,64,20,17941.28,20000,12800000,1115,0.680,902030.64,924311.40,924311.40|
This pull request has been automatically marked as stale because it has If this PR is still relevant, please:
To exempt this PR from auto-close, a maintainer can add the |
|
This pull request has been automatically closed due to 37 days of inactivity. |
What & why
Today the dataset FUSE mount happens per worker —
PythonWorkflowWorker.startPythonProcess()callsDatasetMountManager.ensureMounted()for every bound dataset, so N workers on a Python UDF fire N (idempotent) mount calls, and the invocation lives inside a Python-only class. Any future operator type (e.g. a Java UDF) would have to copy that call.This PR moves the mount up to the region scheduler and splits planning from execution:
RegionExecutionManager.mountRegionDatasets()): gather the deduplicated set of dataset locators across the region's operators and callDatasetMountManager.ensureAllMounted(plan)once, before any worker starts (guarded by anAtomicBooleanso both launch phases mount at most once). Operator-agnostic — any operator that populatesPhysicalOp.mountedDatasetsparticipates with no mount code of its own.ensureAllMounted→ensureMounted): unchanged mount primitive — POST to the node mounter, wait for propagation, idempotent.resolveMountPath): the worker now does a pure in-pod path lookup, no mount.Design
flowchart LR subgraph SCHED["RegionExecutionManager — PLANNING (once per region)"] P["<b>mountRegionDatasets()</b><br/>plan = region.getOperators<br/>.flatMap(_.mountedDatasets.values).toSet<br/><i>deduped · operator-agnostic · single pass</i>"] end subgraph EXEC["EXECUTION — in the CU pod's mount namespace"] E["<b>ensureAllMounted(plan)</b><br/>ensureMounted(locator) each<br/>POST http://NODE_IP:8100/mount<br/>wait for propagation<br/><i>synchronized · idempotent</i>"] end subgraph WORK["PythonWorkflowWorker — per worker"] W["<b>resolveMountPath(locator)</b><br/>PURE LOOKUP — no mount<br/>bind var → /mnt/texera-mounts/<repo>/<commit>"] end P -->|"TODAY: controller pod == worker pod"| E E -->|"mount visible in the shared pod namespace"| W P -.->|"FUTURE: distributed workers → MountDatasets(plan) RPC per pod"| E NM["node mounter DaemonSet<br/>(privileged) · GeeseFS"]:::infra E -->|"POST /mount {cuid,repo,commit,jwt}"| NM NM -.->|"propagates into pod"| W classDef infra fill:#ffe6a3,stroke:#d79b00,color:#7a4f00 style SCHED fill:#b1ddf0,stroke:#10739e style EXEC fill:#ffe6a3,stroke:#d79b00 style WORK fill:#d5e8d4,stroke:#82b366Distribution note (intentional, flagged in code)
The mount executes in the controller's process, and a FUSE mount is only visible inside the mount namespace it lands in. This is correct only while the controller and a region's workers share one computing-unit pod (today's model). Both new methods carry a
Warning:comment: a future distributed-worker deployment would dispatch the execution step to each worker's pod/node. Planning and lookup stay unchanged —ensureAllMountedis the single namespace-bound seam.How it was tested
E2E on a dedicated minikube profile running these images: a
PythonUDFSourceV2 → PythonUDFV2workflow, where the UDF reads a file from a scheduler-mounted dataset. Result:state: Completed, the UDF returned the mounted file's contents, and the CU log showsRequesting mount of dataset-1:<hash>exactly once for the region — confirming the dedup + single-pass behavior.WorkflowExecutionService/compilegreen under JDK17.AI disclosure
Generated-by: Claude Opus 4.8
🤖 Generated with Claude Code
https://claude.ai/code/session_01LWctadaFS9S8CwMhhVZquv