Skip to content

Perf: flush inline sync response before async-promote (iouring) (#300 follow-up) #307

@FumingPower3925

Description

@FumingPower3925

Follow-up from #302 adversarial review. On iouring, a pipelined [sync][async] keep-alive holds the sync response in cs.writeBuf until the dispatch goroutine flushes after running the async handler — byte-order preserved (cluster nightly validated), but sync response wire-send is artificially delayed by async-handler runtime. Fix: in engine/iouring/worker.go handleRecv's ErrAsyncDispatch branch, call flushSend(cs) under detachMu before promoteConnToAsync. Must preserve 'one SEND in-flight per FD' invariant (PR #36) — gate on !cs.sending && !cs.zcNotifPending, fall back to deferred flush otherwise. Epoll already defers via the loop continue, so iouring-only. Source: Adversarial-correctness reviewer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions