Skip to content

Client does not respect context canceled #1698

@ameyaach

Description

@ameyaach

The client does not respect timeouts set on the context. We set a context timeout of 5s and the call blocked for 3 minutes.

Following the code, we realized that the client will always block on the done channel being closed (see here). The client waits for all data to be streamed regardless of whether the context is canceled or timed out. Once the context deadline has passed, there is no point in blocking because the underlying function (QueryRange) ultimately returns an error when the context is canceled, so we blocked for an additional 2min 55seconds when we knew that after 5s QueryRange would return an error.

SHA: dcf944d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions