Skip to content

Implement store-gateway block closing #4465

@simonswine

Description

@simonswine

When serving queries from bucket store-gateways open blocks, but they are never closed:

if err := querier.Open(ctx); err != nil {

We should implement reference counting and also define a block idle time.:

func (q *singleBlockQuerier) Open(ctx context.Context) error {
q.openLock.Lock()
defer q.openLock.Unlock()
if !q.opened {
if err := q.openFiles(ctx); err != nil {
return err
}
}
q.metrics.blockOpened.Inc()
q.opened = true
return nil
}

Reported via the community slack in thread:

Image Image Image

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