Skip to content

Context canceled while uploading visit-mark.json #5332

@yeya24

Description

@yeya24

Describe the bug

We saw a lot of failed bucket operations when uploading visit-mark.json due to context canceled error.

markBlocksVisitedHeartBeat is running in a separate goroutine and its lifecycle is controled by the context of planner.
And in the mark blocks visited loop https://github.com/cortexproject/cortex/blob/master/pkg/compactor/block_visit_marker.go#L127,
we are trying to upload markers first then check whether context is canceled or not.

It is possible to have context already canceled and we are trying to upload markers and failed. After that we check context and exit. This cause bucket operations fail when uploading markers.

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