Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replicate: fix panic: duplicate metrics collector registration attempted #6576

Merged
merged 1 commit into from Aug 1, 2023

Conversation

philipgough
Copy link
Contributor

@philipgough philipgough commented Aug 1, 2023

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

This change fixes a panic in the thanos bucket tools replicate command

goroutine 1 [running]:
github.com/prometheus/client_golang/prometheus.(*wrappingRegisterer).MustRegister(0xc000677cb0, {0xc00095c090?, 0x1, 0x0?})
/go/pkg/mod/github.com/prometheus/client_golang@v1.15.1/prometheus/wrap.go:104 +0x151
github.com/prometheus/client_golang/prometheus/promauto.Factory.NewGaugeVec({{0x2b24c40?, 0xc000677cb0?}}, {{0x0, 0x0}, {0x0, 0x0}, {0x263a69d, 0x2b}, {0x26603fc, 0x3d}, ...}, ...)
/go/pkg/mod/github.com/prometheus/client_golang@v1.15.1/prometheus/promauto/auto.go:308 +0x1e2
github.com/thanos-io/objstore.WrapWithMetrics({0x2b41110?, 0xc000644960}, {0x2b24c40, 0xc000677cb0}, {0xc000133950, 0x9})
/go/pkg/mod/github.com/thanos-io/objstore@v0.0.0-20230713070940-eb01c83b89a4/objstore.go:434 +0x714
github.com/thanos-io/thanos/pkg/replicate.RunReplicate(0xc00063c948, {0x2b113c0?, 0xc00005f8c0?}, 0xc00063e5f0, {0x400b580?, 0xc000c15bc8?}, {0x25db079, 0xd}, {0x0, 0x0}, ...)
/app/pkg/replicate/replicator.go:144 +0xb92
main.registerBucketReplicate.func1(0x0?, {0x2b113c0, 0xc00005f8c0}, 0x6?, {0x2b24b20, 0x400b580}, 0x70?, 0x0?)
/app/cmd/thanos/tools_bucket.go:749 +0x5b3
main.main()
/app/cmd/thanos/main.go:133 +0x122e

Verification

pkg/replicate/replicator.go Outdated Show resolved Hide resolved
Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
Copy link
Member

@squat squat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes more sense to me :))

@squat squat enabled auto-merge (squash) August 1, 2023 16:39
@squat squat merged commit e1a3ec1 into thanos-io:main Aug 1, 2023
16 checks passed
@philipgough philipgough deleted the replicate-flags branch August 1, 2023 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants