Skip to content

turnloop-mysql: COM_STMT_CLOSE and COM_QUIT cannot complete under a completion-driven host #63

Description

@proggeramlug

Problem

COM_STMT_CLOSE and COM_QUIT cannot complete cleanly under a completion-driven host. next_event()'s transitions for these — NoResponse -> Completed and Closing -> Closed — only happen on a subsequent call, made after output() has been acknowledged. But neither command produces a server reply, so nothing ever wakes the connection to make that subsequent call: a completion-driven host has no event to trigger it on, and the queue wedges.

Why it matters

Perry's P7 lane calls this the "Highest-value fix" among everything turnloop-mysql needs. It worked around the wedge with a 0 ms turnloop deadline purely to force a call into the connection after output() is acknowledged — an artificial wakeup for a command that will never get a real one.

What would fix it

Either:

  • A consume_output return value that itself signals "you should call next_event() again right away," or
  • A poll_pending() -> bool that says "call me again" after output has been consumed for a command with no server reply.

Either would let a host complete these two commands without inventing a timer purely to manufacture a wakeup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions