You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Design]: make in-flight spill I/O and decoding interruptible #26437
Follow-up from #26408 and #26412. #26412 adds cancellation checks at admission, batch, bucket, record/header, decode/merge, and physical-write boundaries. Once a blocking file-service call, os.File operation, or expensive decode has started, cancellation still cannot necessarily interrupt it.
Problem
Boundary checks prevent new work after cancellation but do not bound cancellation latency for an already-blocked read/write/flush or CPU-heavy decode. A query can therefore continue holding spill files, FD tokens, disk/memory reservations, and mpool memory until the underlying operation eventually returns.
Proposed direction
Define context-aware spill reader/writer and decoder interfaces.
Propagate cancellation/deadlines through file-service, local-file, remote-object-store, decompression, checksum, and batch-decode layers.
Specify fallback behavior for backends that cannot cancel an in-flight operation.
Keep cleanup ownership separate from the canceled data path so abort does not wait on a resource held by the operation it is trying to stop.
Acceptance criteria
Deterministically blocked read, write, flush, and decode tests terminate within a documented cancellation bound.
No batch or status is delivered after cancellation wins the operation's linearization race.
Disk, live FD tokens, memory budget, decoded batches, builders, and mpool allocations are released exactly once.
Cancellation works during initial spill, probe scatter, rebuild, merge, and re-spill.
Backends without native cancellation use a documented bounded fallback or report that cancellation is pending; they do not silently claim immediate cancellation.
Metrics distinguish queued, in-flight, canceled, abandoned, and completed spill I/O.
Roadmap decision: #26563. This is not a prerequisite for the proven EOF-to-finalization cancellation bugs. First fix #26444/#26446/#26447 with checks at phase and bucket/run/chunk boundaries, then measure remaining cancellation latency. Build context-aware I/O only if blocked syscall/decode evidence dominates; avoid cancellation goroutines that concurrently close another owner's FD.
Closing as evidence-gated work that is not currently planned.
The proven phase-boundary cancellation gaps were fixed independently. No current-main workload attached here identifies a specific blocked read, write, flush, or decode operation and measures it as the dominant remaining cancellation latency. A general context-aware I/O framework would therefore expand ownership and concurrency risk without a reachable failure.
Create a new, operation-specific issue only when deterministic current-main evidence identifies the blocked call, cancellation winner, latency bound, and resource owner. Do not use a goroutine that closes another owner's FD as a generic workaround.
Activity
XuPeng-SH commentedon Aug 1, 2026
Roadmap decision: #26563. This is not a prerequisite for the proven EOF-to-finalization cancellation bugs. First fix #26444/#26446/#26447 with checks at phase and bucket/run/chunk boundaries, then measure remaining cancellation latency. Build context-aware I/O only if blocked syscall/decode evidence dominates; avoid cancellation goroutines that concurrently close another owner's FD.
XuPeng-SH commentedon Aug 12, 2026
Closing as evidence-gated work that is not currently planned.
The proven phase-boundary cancellation gaps were fixed independently. No current-main workload attached here identifies a specific blocked read, write, flush, or decode operation and measures it as the dominant remaining cancellation latency. A general context-aware I/O framework would therefore expand ownership and concurrency risk without a reachable failure.
Create a new, operation-specific issue only when deterministic current-main evidence identifies the blocked call, cancellation winner, latency bound, and resource owner. Do not use a goroutine that closes another owner's FD as a generic workaround.