Skip to content

Close never called on PromQL Query used in query splitting or sharding #5713

Open
@charleskorn

Description

@charleskorn

We call Exec on a PromQL Query here and here for query splitting and sharding, respectively, but never call Close on it.

This means that the PromQL engine can never release resources associated with the query. (At present, it returns a bunch of data structures to a pool, but this could change in the future.)

Fixing this isn't straightforward, as we currently use unsafe conversion to retain a reference to the query result until we encode it and send it to the caller. We'd likely need to add a cleanup mechanism to PrometheusResponse.

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