Skip to content

feat(transfer): bypass ReorderBuffer when delay-updates is off (#1886)#3988

Merged
oferchen merged 2 commits into
masterfrom
feat/reorder-buffer-bypass-1886
May 13, 2026
Merged

feat(transfer): bypass ReorderBuffer when delay-updates is off (#1886)#3988
oferchen merged 2 commits into
masterfrom
feat/reorder-buffer-bypass-1886

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • Add passthrough() constructor and is_passthrough() accessor to both ReorderBuffer (engine crate) and BoundedReorderBuffer (transfer crate) that skip sequence-based reordering, delivering items in insertion order via a lightweight VecDeque FIFO queue
  • Wire bypass through DeltaConsumer::spawn_bypass(), ParallelDeltaPipeline::new_bypass(), and ThresholdDeltaPipeline::new_bypass() so callers can opt in based on --delay-updates configuration
  • When --delay-updates is off, files are committed immediately upon completion - strict file-list ordering is unnecessary, and the bypass eliminates per-item ring buffer slot indexing and BTreeMap overhead

Test plan

  • Passthrough mode delivers items in insertion order regardless of sequence numbers
  • Passthrough insert never returns CapacityExceeded / BackpressureError
  • drain_ready() yields all items from the FIFO queue in passthrough mode
  • force_insert() appends to the queue in passthrough mode
  • finish() succeeds when drained, panics when items remain (passthrough)
  • take() returns None in passthrough mode (indexed extraction not supported)
  • is_passthrough() returns correct value for both modes
  • Metrics track delivery count in passthrough mode (BoundedReorderBuffer)
  • DeltaConsumer::spawn_bypass() delivers all results from parallel workers
  • ParallelDeltaPipeline::new_bypass() delivers all results via trait object
  • ThresholdDeltaPipeline::new_bypass() falls back to sequential below threshold, uses bypass parallel above
  • Large batch (500+ items) stress tests for both bypass consumer and pipeline
  • DeltaResult integration test verifies passthrough preserves all result fields

Add passthrough mode to both ReorderBuffer (engine) and
BoundedReorderBuffer (transfer) that skips sequence-based reordering.
When --delay-updates is disabled, files are committed immediately upon
completion, making strict file-list ordering unnecessary. The bypass
eliminates per-item ring buffer and BTreeMap overhead by routing items
through a lightweight FIFO queue.

Wire the bypass through DeltaConsumer::spawn_bypass(),
ParallelDeltaPipeline::new_bypass(), and
ThresholdDeltaPipeline::new_bypass() so callers can opt in based on
transfer configuration.
@github-actions github-actions Bot added the enhancement New feature or request label May 13, 2026
@oferchen oferchen merged commit 52d18e8 into master May 13, 2026
39 checks passed
@oferchen oferchen deleted the feat/reorder-buffer-bypass-1886 branch May 14, 2026 14:57
oferchen added a commit that referenced this pull request May 18, 2026
#3988)

* feat(transfer): bypass ReorderBuffer when delay-updates is off (#1886)

Add passthrough mode to both ReorderBuffer (engine) and
BoundedReorderBuffer (transfer) that skips sequence-based reordering.
When --delay-updates is disabled, files are committed immediately upon
completion, making strict file-list ordering unnecessary. The bypass
eliminates per-item ring buffer and BTreeMap overhead by routing items
through a lightweight FIFO queue.

Wire the bypass through DeltaConsumer::spawn_bypass(),
ParallelDeltaPipeline::new_bypass(), and
ThresholdDeltaPipeline::new_bypass() so callers can opt in based on
transfer configuration.

* fix(transfer): remove unused bypass_queue field from BoundedReorderBuffer
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