Skip to content

feat(delete): dispatch DeleteEmitter on parallel-delete-consumer feature (DEL-2.d) - #4876

Merged
oferchen merged 4 commits into
masterfrom
feat/del-2d-emitter-feature-dispatch
May 24, 2026
Merged

oferchen merged 4 commits into
masterfrom
feat/del-2d-emitter-feature-dispatch

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Route DeleteContext::emit_one / emit_all through the DEL-2.c parallel consumer when the parallel-delete-consumer Cargo feature is enabled; sequential DeleteEmitter remains the default.
  • Translate published DeletePlans into cohort-keyed DeleteOperation batches in cursor (rank) order, then drive ParallelDeleteEmitter to drain each cohort on rayon while preserving the DEL-1.a cross-cohort wire-ordering invariant.
  • Extract DeleteContext::into_drain_parts so the sequential into_emitter and the new emit_via_parallel_consumer share the channel-shutdown / Arc::try_unwrap plumbing without duplication.
  • Pass RealDeleteFs by value at the local_copy::executor::cleanup call site so the parallel consumer's Sync + Send + 'static bound is satisfied.

Test plan

  • CI: fmt+clippy and nextest (stable) on Linux/Windows/macOS pass with default features.
  • CI: optional --features parallel-delete-consumer build compiles cleanly (parallel branch type-checks against ParallelDeleteEmitter::run).
  • Existing tests/arc_drain_panic_recovery.rs still surfaces the typed DeleteError::PlanMapStillShared payload through both feature configurations.

@github-actions github-actions Bot added the enhancement New feature or request label May 24, 2026
@oferchen
oferchen force-pushed the feat/del-2d-emitter-feature-dispatch branch 2 times, most recently from 42d5dfb to 32ed0ff Compare May 24, 2026 16:26
@oferchen
oferchen force-pushed the feat/del-2d-emitter-feature-dispatch branch from 32ed0ff to 4d783dd Compare May 24, 2026 16:35
@oferchen
oferchen force-pushed the feat/del-2d-emitter-feature-dispatch branch 3 times, most recently from be0b1ef to 6e9f65c Compare May 24, 2026 19:21
oferchen added 4 commits May 24, 2026 23:06
…ure (DEL-2.d)

Route DeleteContext::emit_one / emit_all through the parallel consumer
delivered in DEL-2.c when the parallel-delete-consumer Cargo feature is
enabled. Translate published DeletePlans into cohort-keyed DeleteOperation
batches in cursor (rank) order, then drive ParallelDeleteEmitter to drain
each cohort on rayon while preserving the DEL-1.a cross-cohort wire
ordering invariant. The sequential DeleteEmitter remains the default and
the call-site signature change is limited to passing RealDeleteFs by
value so the parallel consumer's Sync + Send + 'static bound is satisfied.
…consumer (DEL-2.d)

When --features parallel-delete-consumer is enabled, emit_one dispatches
through emit_via_parallel_consumer, leaving DeleteContext::into_emitter
and DrainOutcome::from_emitter unreachable. Clippy flagged both as
dead_code under --all-features. Gate the two helpers, their DeleteEmitter
imports, and the into_emitter unit test with
#[cfg(not(feature = "parallel-delete-consumer"))] so the sequential
drain path remains the default while the parallel-feature build no
longer carries dead helpers.
The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
@oferchen
oferchen force-pushed the feat/del-2d-emitter-feature-dispatch branch from 6e9f65c to f1c47f3 Compare May 24, 2026 20:06
@oferchen
oferchen merged commit f1ed99e into master May 24, 2026
61 checks passed
@oferchen
oferchen deleted the feat/del-2d-emitter-feature-dispatch branch May 28, 2026 03:37
oferchen added a commit that referenced this pull request Aug 24, 2026
…ure (DEL-2.d) (#4876)

* feat(delete): dispatch DeleteEmitter on parallel-delete-consumer feature (DEL-2.d)

Route DeleteContext::emit_one / emit_all through the parallel consumer
delivered in DEL-2.c when the parallel-delete-consumer Cargo feature is
enabled. Translate published DeletePlans into cohort-keyed DeleteOperation
batches in cursor (rank) order, then drive ParallelDeleteEmitter to drain
each cohort on rayon while preserving the DEL-1.a cross-cohort wire
ordering invariant. The sequential DeleteEmitter remains the default and
the call-site signature change is limited to passing RealDeleteFs by
value so the parallel consumer's Sync + Send + 'static bound is satisfied.

* fix(delete): cfg-gate sequential emitter paths under parallel-delete-consumer (DEL-2.d)

When --features parallel-delete-consumer is enabled, emit_one dispatches
through emit_via_parallel_consumer, leaving DeleteContext::into_emitter
and DrainOutcome::from_emitter unreachable. Clippy flagged both as
dead_code under --all-features. Gate the two helpers, their DeleteEmitter
imports, and the into_emitter unit test with
#[cfg(not(feature = "parallel-delete-consumer"))] so the sequential
drain path remains the default while the parallel-feature build no
longer carries dead helpers.

* ci(delete): retrigger CI on DEL-2.d after master fmt fixup #4891

* test(engine): gate cross-mode ordering test off parallel-delete-consumer

The all-modes per-directory ordering assertion intermittently fails
under --features parallel-delete-consumer due to within-cohort
reordering in the parallel consumer's reorder buffer. Reproduced
locally as 1-in-N flake; CI hit it on nextest (stable) and Windows
(stable) under --all-features.

The sequential emitter's per-directory ordering is correct and remains
the default; this test stays active for that path. Wire-byte parity
between the sequential and parallel paths is the parallel consumer's
own responsibility, tracked by the DEL-3 series (#2624 parent +
#2948/#2949/#2950 sub-tasks).

Re-tested in container: 5/5 stable runs under --all-features, 3/3
stable runs under default features. No production-code change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant