Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gracefully handle prepended query cancellation #4909

@vonzshik

Description

@vonzshik

In some cases instead of sending a query immediately, we prepend it, so we can send it with a next query. We do this for BEGIN TRANSACTION and whenever a connection is reset as it's returned to the pool.
#4907 made it so we shouldn't even send a cancellation request until we've read all of the responses for the prepended query. Instead, we can make it so the prepended query runs in the same transaction as an actual query.
This is going to require:

  • Make prepended queries use extended query protocol
  • Automatically prepare all of prepended queries on opening a connection
  • We should restore the write buffer with prepended query whenever there is an error while executing a query
  • Benchmark the change

cc @roji

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions