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

Skip to content

Investigate sending DISCARD ALL message asynchronously on Close() #3029

@Brar

Description

@Brar

At the moment DISCARD ALL is written to the write buffer when you close a pooled connection, didn't set No Reset On Close, didn't turn on multiplexing, and have no prepared statements, but it isn't actually sent to the server before sending the next command on this connection (to save a round trip).
In scenarios where the connection pool isn't saturated it might be worth sending the command asynchronously when the connection is sent to the pool and hope that everything is done when it is handed over again.
In this case this might decrease latency for the next command being sent.
In other cases (when the pool is saturated) the additional round trip will obviously hurt performance and add some somewhat unpredictable latency to opening new pooled connections.
It might be worth investigating the performance impact of this under different loads.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions