Repository navigation
[data][actor-only] Fix iceberg on actor pools - #68252
iamjustinhsu wants to merge 28 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request prevents MapOperators from scaling up actors until their registered on_start callback (such as on_write_start for Iceberg) has executed. This ensures that the serialized MapTransformer does not miss critical state initialization. To achieve this, a new awaiting_on_start check is introduced, and the OperatorSizer blocks scaling for these operators until they receive their first input and execute the callback. Unit tests have been added to verify this behavior. I have no feedback to provide as there are no review comments.
f87c0c1 to
c2d140f
Compare
e88af2b to
5acbb2e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5acbb2e. Configure here.
…ors and options The actor-only backend runs every operator on an actor pool, so the shuffle / all-to-all operators, which schedule their own tasks, have no implementation under it. Reject them once the topology is built rather than stalling partway through execution. `validate_actor_only_supported_topology` rejects AllToAllOperator, HashShuffleOperator, HashAggregateOperator, JoinOperator, ShuffleMapOp, ShuffleReduceOp and ZipOperator, plus `preserve_order=True`. `StreamingExecutor.execute` calls it right after `build_streaming_topology`, gated on `actor_only_backend_enabled()`, so the default path is untouched. Operators are checked before the `preserve_order` option on purpose: `Dataset._execute` forces `preserve_order=True` for plans that require ordering (Zip, Sort), so checking the option first reports "preserve_order" for an operator that is itself the unsupported thing and hides the real reason. The validation lives under `_internal/experimental/execution/` so the actor-only streaming executor can take it over when it lands; it is a free function rather than a method for that reason. Test: pytest python/ray/data/tests/actor_only (67 passed, including all 13 of test_disabled_configs.py). With the flag off, zip / sort / random_shuffle still execute normally. AI assistance was used for this change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
#67951) ## Summary Adds `iceberg_manifest.py`, which carries each PyIceberg `FileScanTask` that `plan_files()` returns, pickled with Ray's `cloudpickle`, as one row of a Datasource V2 `FileManifest`, and hands the same task back on the read side. It is the data contract the rest of the port is written against; nothing calls it yet. 2 of 5 in the stack moving `read_iceberg` onto Datasource V2 (#66181), built on #67037 (merged), which lets a source carry its own manifest columns. ## Before Datasource V2 splits a read into a `ListFiles` task that decides what to read and `ReadFiles` tasks that read it, and the only thing passed between them is a `FileManifest`: path, size and chunk metadata per file. An Iceberg read needs more per data file (its delete files, partition values and residual filter), and a PyIceberg `Table` or `FileIO` can't cross the task boundary to look them up again. There was no way to express an Iceberg scan task in V2. ## After `manifest_from_scan_tasks(tasks)` writes one manifest row per task: the three required columns (chunk metadata is null, since a task is a whole file) plus `__ib_scan_task`, the pickled task. `scan_tasks_from_manifest(manifest)` unpickles them in row order, and the reader in [3/5] hands them to `ArrowScan` unchanged. V1 already ships these same objects to its read tasks inside `ReadTask` closures, which Ray serializes with the same `ray.cloudpickle`. An earlier revision rebuilt each task from seven typed columns. That needed PyIceberg internals (`DataFile.from_args`, `Record`) that change between releases. On PyIceberg 0.9, `DataFile.from_args` doesn't exist, so every V2 read failed. Listing and reading run in one cluster with one PyIceberg version, so the pickled task needs none of them. This example plans a two-file table partitioned by `identity(region)` with `row_filter="n >= 5"`, then encodes and decodes the tasks: ``` __path: string __file_size: int64 __file_chunk_metadata: null __ib_scan_task: binary {'__path': '.../00000-0-4e69...parquet', '__file_size': 927, '__file_chunk_metadata': None, '__ib_scan_task': '<1111 bytes>'} partitions: ['Record[eu]', 'Record[us]'] residuals: ["GreaterThanOrEqual(term=Reference(name='n'), literal=LongLiteral(5))", "GreaterThanOrEqual(term=Reference(name='n'), literal=LongLiteral(5))"] same as planned: True ``` The cost is manifest size, which grows with the table's column count because a task carries per-column stats: about 1.6 KB per file at 10 columns and 84 KB at 1,000 (PyIceberg 0.11.1). Unpickling takes at most 0.11 ms per file, against 25 ms to read even a 100-row, 1,000-column file. ```mermaid flowchart TD subgraph Before subgraph BS["Subsystem: IO"] subgraph BC["Component: Datasource V2 read"] B1["ListFiles task"] -->|"FileManifest: path, size, chunk metadata"| B2["ReadFiles task"] end end end subgraph After subgraph AS["Subsystem: IO"] subgraph AC["Component: formats/iceberg/iceberg_manifest.py"] A1["plan_files(), in the ListFiles task"] -->|"FileScanTask"| A2["manifest_from_scan_tasks"] A2 -->|"FileManifest: 3 required columns + pickled task"| A3["scan_tasks_from_manifest"] A3 -->|"the same FileScanTask"| A4["ArrowScan, in the ReadFiles task"] end end end classDef added fill:#c8e6c9,stroke:#2e7d32,color:#000 class A2,A3 added ``` The callers on either side of the two new functions arrive in [3/5]. ## Subsystems IO: a new `_internal/datasource_v2/formats/iceberg/` package (`__init__.py`, `iceberg_manifest.py`); tests in `tests/datasource/test_iceberg.py`. ## Testing `pytest python/ray/data/tests/datasource/test_iceberg.py -v -x --tb=short`: 96 passed on this branch rebased onto master `5a7c85e587` (pyarrow 24.0.0, PyIceberg 0.11.1). The same file also passes with [3/5] to [5/5] stacked on top (104, 133 and 139 passed). The three new tests round-trip planned tasks: - every field the reader uses survives, including a real residual and the delete files; - hand-built position deletes survive; - decoded tasks read the same rows through `ArrowScan` as the originals. On the previous revision, which pickled with the standard library's `pickle`, a manifest round trip followed by an `ArrowScan` read also returned identical rows on PyIceberg 0.8.1, 0.9.0, 0.11.0, 0.11.1 and 0.12.0rc1. On 0.11.1, `cloudpickle` writes the same bytes for these tasks. ruff 0.8.4 (default and `--select I`), black 22.10.0, pydoclint 0.9.1 and pyrefly (in CI's environment) report no errors. Not a duplicate: no open PR moves `read_iceberg` to Datasource V2; the only other open Iceberg PR, #68252, changes actor-pool sizing in the executor and doesn't touch the read path. AI assistance (Claude Code) was used. I have reviewed every changed line and ran the tests above locally. Signed-off-by: Aarrya <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Aarrya <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…r only backend Adds experimental actor pool and actor pool map operator which will be used when the actor only backend is enabled. We are deliberately keeping this separate so that when the flag is off the existing path is minimally affected. the new actor pool supports: - gracefully draining of actors running tasks - integration with the resource bank API's - support for actor level backpressure - uses core actor backpressure (`_actor_generator_backpressure_num_objects`) - input admission: each actor always admits a small task floor (max_concurrency x RAY_DATA_PER_ACTOR_INPUT_BACKPRESSURE_MIN_NUM_TASKS, default 2/slot); beyond the floor, a per-actor input-bytes cap owns admission. Setting max_tasks_in_flight_per_actor raises NotImplementedError under this backend. - dynamically setting output bp for actors and enforcing it during object consumption from streams - down scaling specific actors - upscaling actors on specific nodes - sets num cpu = 1 when num_gpu > 0 and num_cpu=0. Not currently used, will be used by subsequent pr's Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
- adds a new experimental scheduling executor + progress logs + metrics + dashboard which will be used when actor only backend is enabled. - adds placeholders for the operator sizer which will be filled in in the next pr in the stack Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
## Overview Add the operator sizer which handles sizing (answers the question: how many actors of each operator should be running every tick) and placement (where to scale up new actors, which actor to downscale). the sizing path is largely broken down into: - scale_how_many() -> responsible for per operator greedy sizing decisions (looks at individual operators not the topology as a whole) - scale_where() -> responsible for placement - optimize() -> takes a more wholistic view of the topology before making key sizing decisions, currently supports two rules - capacity transfer: when we have reached max cluster capacity (cluster can no longer scale up) we might run into a scenario where both a producer (upstream) and consumer (downstream) op have a large backlog. the producer is bottlnecked by the downstream consumer but greedy op local sizing decisions tries to scale both op's but gets stuck due to lack of resources. in these scenarios, unused capacity of upstream op's is transfered to downstream ops via a cross tick (undisturbed) donor scale down followed by the bottle neck op scale up - an op may be output back pressured (so greedy sizing would suggest making no changes for the op) but its downstream is keeping up with its production speed, in this case the upstream op should scale up as all its outputs are being promptly consumed this pr also adds some new dashboards specific to sizing and placement. ## Glossary ### Capacity - **reserved** This dataset's slice of each node, as the autoscaling coordinator hands it out (`DatasetAllocationView`). - **committed** What our non-PG actors hold on a node: running actors plus pending actors at their target node. - **free** `reserved - committed`, per node. - **schedulable nodes** Nodes an op may run on: its label selector matches, and the slice is large enough for at least one of its actors. - **constrained** An op that can run on only some nodes, either because it has a label selector or requires a GPU. - **nodes to reclaim** Nodes where we hold more than our slice allows, for example because the coordinator shrank the allocation or the node is draining. Actors are evicted there until we fit within the slice. - **PG-managed** An op whose actors are placed through a placement group. The sizer never picks their node. Non-PG ops are placed by the sizer. ### Per-op sizing (`scale_how_many`) - **tick** One sizing evaluation, performed every `SIZER_CADENCE_S`. - **warmup** The first phase of a run. Until every critical op has produced output, there is no backpressure to react to, so each op is sized to an equal share of the allocation. - **has work** Input is queued or tasks are in flight. - **backpressured** The op's output is blocked: enough of its actors have exhausted their output budget (`SIZER_OUTQUEUE_FULL_FRACTION`). - **demand** How many actors the op needs for its current backlog: queued input plus tasks in flight. - **want** The delta an op asks for based on its own signals, before capacity is checked. - **ledger** One tick's free capacity, debited as wants are granted. - **shortfall** How many actors an op asked for but was not granted. - **ungranted** An op that asked to grow and was granted zero actors. ### Cross-op optimization (`optimizer`) - **guard** A lock over ops: while one rule is resizing an op, nothing else touches it. - **keeping up** A consumer that takes its producer's output as fast as it arrives, so it is not what limits the pipeline. - **silent bottleneck** An op that limits the pipeline but never asks to grow: its actors are busy and its output is backpressured, while its consumers keep up. - **capacity transfer** Moving actors from ops with spare actors (donors) to an op whose ask keeps going ungranted (the recipient). - **victim** One donor actor evicted to make room for the recipient. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
## Overview Add new release tests for constraint based scheduling (node labels and placement groups). These are not supported in the task based backend and are a new addition supported in the actor only backend Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
Make the sizer's scaling requests node-shaped. scale_where resolves each operator's delta to concrete nodes for both scale-ups and scale-downs (pick_downscale_nodes), and the actor pool applies those per-node deltas directly. Placement is re-derived from current state every tick, so a failed placement or a slow drain simply retries. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
…ing_actor Node-shaped scaling removed _ExperimentalActorPool._try_remove_pending_actor; a single pending actor is now cancelled through _downscale_actor_by_id. The "pending" case of test_exact_resource_requests_lifecycle still called the removed method and failed with AttributeError. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]>
Sizer follow-ups: - Open capacity transfers hold the capacity they're still owed against free capacity, so another op can't take it before the recipient scales up. - A transfer that would undo a recent one is refused as thrashing for RAY_DATA_SIZER_TRANSFER_THRASH_WINDOW_TICKS ticks (default 20). - Warmup ends after at most RAY_DATA_SIZER_WARMUP_TIMEOUT_S (default 300s) even if a critical op never produces output. - Initial-sizing order: below-min ops go first, but the scarcity tiers (label, placement group, GPU) still apply within that group, so constrained ops are placed before unconstrained ones at startup. - heterogeneous_memory_batch_inference requests num_cpus=1 for its GPU stage, and the GPU nodes in its compute configs (single-tenant and multitenancy) get CPUs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
…ly backend when actor only is enabled, continue populating some of the older metrics for backwards compatibility. these metrics will eventually be deprecated once the task backend is fully removed Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
…y by Ray actor id The actor-only backend relied on Ray core to restart dead actors (`max_restarts=-1`, inherited from the task-backend operator). That forced a RESTARTING state, actor relocation, and a uuid "logical actor id" through the actor pool, the ResourceBank and the sizer. It also conflicts with Ray Data lineage recovery: core restarts actors that Data should replace, and a restarted actor's outputs can't be rebuilt by Data. New model: **a dead actor is gone.** The pool releases it, the sizer places a replacement, and (in 13/n) Data lineage recovery redoes the lost work. - **No core restarts.** Actor-only actors get `max_restarts=0`. A user `max_restarts != 0`, from `ray_remote_args` or a `ray_remote_args_fn`, is rejected as unsupported. `max_task_retries` stays `-1` unless the user sets it, so `retry_exceptions` / `actor_task_retry_on_errors` still retry on a live actor. - **Restart and relocation code removed:** the RESTARTING handling in the pool, `_relocate_actor`, the bank's relocation path (`evict_actor` / `adopt_actor` / `_release_refs_on_node` and the migration branch of `on_maybe_register_actor`), the `core_restart` drain-cancel cause, and the `RAY_DATA_REFRESH_ACTOR_STATE` flag. `maybe_register_actor(node_id=...)` now asserts an actor never changes node. - **Dead actors are released.** Before, a dead actor that wasn't draining stayed in the pool and the sizer kept counting it. Now any dead actor is released and deregistered from the bank. A task failing with an actor-death error releases the actor at once; `ActorUnavailableError` does not. - **Ray actor id replaces the logical id.** Actors never restart, so the actor-only backend keys actors by their Ray actor id (hex), typed as a new `ActorId`. The worker reports the same id. The task backend keeps `LogicalActorId`. - **`max_consecutive_actor_init_deaths` now applies here,** but only to deaths where the actor's `__init__` raised (`actor_init_failed`), i.e. a broken UDF. A process or node lost while starting is not charged; the sizer re-places the actor. Before, the scheduling loop swallowed the budget error. - **Draining:** `process_draining_actors` runs inside `refresh_actor_state`, and the output-queue priority sync runs first in `refresh_state`. - **Placement:** actors are placed with hard node affinity (`soft=False`). If the node goes away first, the pending-actor expiry frees the claim. - **Rename:** `current_size` → `total_size`. Known gap until 13/n: with core restarts off and Data lineage recovery not yet wired in, an actor death fails the dataset. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
12/n stopped Ray Core from restarting actor-only actors. A dead actor is released and the sizer replaces it, so its lost work, and any blocks lost with a node, have to be rebuilt by Ray Data lineage reconstruction (#66220). This PR wires that into the actor-only backend. **Recovery routing** - On a lineage-tracked task, `RayActorError` (the actor died) now goes to lineage reconstruction, like `ObjectLostError`. That applies in both the default executor loop and the actor-only loop, through one shared `recover_or_count_lost_output` helper. `ActorUnavailableError` does not. - Deferred metadata-fetch failures go through the same routing. The fetcher now reports the failed task instead of its operator name. - The actor-only backend refuses to start when the job has Data reconstruction off (`JobConfig(_disable_job_level_lineage_reconstruction=True)` not set), because nothing else can recover a node loss. Plans #66220 can't reconstruct (split, union, mix, limit) still run, with reconstruction off for that dataset. **ResourceBank accounting** - During reconstruction, a re-made block is withheld until its child's whole input set is back. Withheld blocks are now charged to the producing actor, and also counted as withheld, so they can be told apart from output a consumer can drain. Release, a displaced copy, and `clear_internal_output_queue` each undo the charge. - A released input set goes into the output queue under the producing actor's key (`_output_add_kwargs`), not the task index. **Escape hatch for withheld-block wedges** - An actor is wedged when its pull budget is exhausted only because of blocks it is withholding. Nothing downstream can drain those blocks until the set is complete, so it would stall forever. - `relieve_withheld_wedges` runs before the existing output-limit walk. It gives a wedged actor room for what it withholds plus one block: 1. free object store on its node, reserved in the bank so no other grant counts it again; 2. then unused budget lent by other actors on the same node, whose caps go down by the same amount; 3. if that's not enough, it waits while those actors' full budgets would cover the rest once their outputs are consumed, and only oversubscribes beyond that. - Grants are kept on the actor and given back once its withheld outputs are released, or when it dies (lenders get their budget back). - The existing output-limit hatch now uses the same reservation and borrowing. It still grants its one-block bump immediately when there's no room. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
## Why Fixes to the actor-only (AO) backend's sizer and drain handling, stacked on 13/n. They were found while running the Ray Data release benchmarks on the actor-only backend. 1. **Completed operators never released their draining actors.** `StreamingExecutor` stops calling `refresh_state` once an operator completes, and that is where AO tears down draining actors whose outputs have been consumed. Those actors held their node's resources until the dataset ended. In `read_from_uris`, 16 `PlanDownloadBlocks` actors sat idle for about 700 s. - AO-only change. `ExperimentalStreamingExecutor` tracks each actor-pool op from the moment it completes, calls `process_draining_actors()` every step, and stops tracking it once no draining actors are left. - Fault tolerance: lineage reconstruction can resubmit tasks to a completed op. The op is then running again and drains through its own `refresh_state`; when it completes again it is tracked again. - `read_from_uris` dropped from about 1,260 s to about 1,010 s (master with AO off: 966 s). 2. **The capacity-transfer donor rule counted queued tasks as work.** - The productive signal was tasks in flight minus blocked tasks. That includes each actor's queued second task, so `protected = ceil(peak / concurrency)` came out at about twice the busy actors, and no transfer ever fired. Example: decode protected 140 actors on a 92-actor pool. - The signal is now `productive_task_slots()`: in-flight tasks capped at concurrency, summed over ACTIVE actors that are not output-blocked. A task already sent to an actor but queued behind the running one no longer counts. The op's input backlog was never part of this signal; a backlog keeps actors running, which protects them. 3. **A just-grown op looked like a donor.** With fix 2, actors still starting up count as unproductive, so an op that had just scaled up could give those actors away in the next window. In `image_classification`, the GPU op `Predictor` grew 7→9, then six seconds later gave the 2 starting actors to `ReadFiles`. The 40 s thrash guard blocked the reverse transfer, and Predictor stayed at 7 of 10 GPUs, costing about 40 s. - Pending actors are now protected in `assess_donor`. 4. **GPU actors are a last resort for CPU-only recipients.** `_frees_short_dim` accepts a GPU actor as a victim because it frees a CPU, which leaves the GPU idle. Seen in `image_classification` (Predictor → ReadFiles) and `video_object_detection` (ExtractImageFeatures → Write). - For a recipient that needs no GPU, `plan_transfer` now plans with GPU-free donors first. It falls back to all donors only when that finds nothing, so an idle GPU actor can still be given up when nothing else fits. 5. **The silent-bottleneck rule almost never fired.** - It required the fewest tasks in flight across the window to be at least the actor count. Some actors are always between tasks, waiting for a full input bundle that a slow upstream hasn't filled yet, so the check fails. Example: heterogeneous_memory. cpu_process takes about 8 input blocks per task but had 3–7 queued, so it ran 8–12 tasks on 12 actors while its GPU consumer's queue was empty. That gave 0 grants there; video got 4 late, single-actor grants. - The gate (`_every_actor_busy`, renamed `_most_actors_busy`) is now `RAY_DATA_SIZER_SILENT_BOTTLENECK_BUSY_FRACTION` of serving actors (default 0.6) at every sample. The other conditions are unchanged: output backpressured for the whole window, and consumers keeping up. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]> Co-authored-by: sampan <[email protected]> Co-authored-by: Prasad Palkar <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
…anded transfer victims An op held at zero actors until its on_start runs (e.g. a Write sink) had nothing reserving room for it, so upstream warmup could fragment every node's memory and the sink could never place its first actor. Hold its min-size actors out of each tick's free capacity until it is released; it is then below min size and granted first. A capacity transfer that timed out left its victims draining. A victim whose outputs can only be consumed through the recipient never drains, so each retry stranded one more donor actor. On timeout, reclaim the victims still draining on nodes the transfer never placed on. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]>
|
if on_start takes time to start, sizer may exit warmup phase. Also I was thinking we could integrate on_start hook with warmup in a more simpler way (would achieve the same thing your current changes do, was just thinking if we could make it easier to read)
|
I think we dont need to do it, sizer would scale it up and it would happen automatically. is there a reason to specifically do it? |
Signed-off-by: iamjustinhsu <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
| # Actors last held for each op awaiting its first input, and the | ||
| # one-time grant to that count queued when the input arrives. | ||
| self._held_actors_by_op: Dict[ExperimentalActorPoolMapOperator, int] = {} | ||
| self._grow_to_held: Dict[ExperimentalActorPoolMapOperator, int] = {} |
There was a problem hiding this comment.
why do we need this map?
we can keep entry in _held_actors_by_op when its not yet started and remove from _held_actors_by_op once it starts?
There was a problem hiding this comment.
Oh yea i think it's because during the process of held'ing, the held actors across ticks wouldn't be preserved. This can be fixed
Signed-off-by: iamjustinhsu <[email protected]>
Signed-off-by: iamjustinhsu <[email protected]>
…branch Ports its behavior onto the refactored sizer: - Ops start no actors until their first input bundle is queued (OpLifecycle.AWAITING_ON_START -> AWAITING_FIRST_INPUT), with their warmup share held meanwhile; a still-held op with nothing to hold this tick is recorded, so it is not mistaken for released. - WARMUP also waits until every unfinished op has received its first input. - A timed-out transfer no longer gives its still-draining victims back (reclaim_draining_actors loses node_id). tick.py and test_sizer_pipeline_optimizer.py stay deleted (superseded on this branch). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: iamjustinhsu <[email protected]>
…s-until-on-write-start-begins Signed-off-by: iamjustinhsu <[email protected]>
…s-until-on-write-start-begins Signed-off-by: iamjustinhsu <[email protected]>

Description
Iceberg has an on_start hook that runs once the first upstream is produced. The reason is because iceberg needs input metadata before serializing the
MapTransformer. Currently, in actor pools we start actors before theiron_write_starthook is called, which means that the serialized map transformer is not propagated to the actor. This PR gates sizing until on_start is called by:of only does that require on_start callback (I think only iceberg for now)and making sure no actors start until their first input is receivedMaking sure to return donor victims back to normal after a drain timeout. So if you have Read -> Write, and Write has no actors, then we need to drain the Read actors before scaling write. Apparently, this wasn't done properly before, but I could be wrongRelated issues
Additional information