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

metadata: Fixed panic when no ext labels are set; Added more tests. #3461

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

bwplotka
Copy link
Member

caller=fetcher.go:700 msg="block has no labels left, creating one" replica=deduped
panic: assignment to entry in nil map
goroutine 441 [running]:
github.com/thanos-io/thanos/pkg/block.(*ReplicaLabelRemover).Modify(0xc000b19d70, 0x2b261e0, 0xc000c16d00, 0xc0008596e0, 0xc000b1a980, 0x0, 0x0)
	/remote-source/app/pkg/block/fetcher.go:701 +0x3cf
github.com/thanos-io/thanos/pkg/block.(*BaseFetcher).fetch(0xc000d75d40, 0x2b261e0, 0xc000c16d00, 0xc000c16a40, 0xc000c16a00, 0x4, 0x4, 0xc000b0e590, 0x1, 0x1, ...)
	/remote-source/app/pkg/block/fetcher.go:441 +0x65d
github.com/thanos-io/thanos/pkg/block.(*MetaFetcher).Fetch(0xc0002fe480, 0x2b261e0, 0xc000c16d00, 0x5528a0, 0xc000c16340, 0xc0005c6000, 0x8)
	/remote-source/app/pkg/block/fetcher.go:474 +0x9f
github.com/thanos-io/thanos/pkg/compact.(*Syncer).SyncMetas(0xc000c67d80, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:127 +0xc0
github.com/thanos-io/thanos/pkg/compact.(*BucketCompactor).Compact(0xc0002fed20, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:945 +0x2c2
main.runCompact.func6(0xc000501c80, 0x0)
	/remote-source/app/cmd/thanos/compact.go:307 +0x15a
main.runCompact.func7.1(0xc0006bbd70, 0xc000bbe0a0)
	/remote-source/app/cmd/thanos/compact.go:367 +0x99
github.com/thanos-io/thanos/pkg/runutil.Repeat(0x45d964b800, 0xc00005a660, 0xc0007e9f30, 0x0, 0x0)
	/remote-source/app/pkg/runutil/runutil.go:72 +0x91
main.runCompact.func7(0x0, 0x0)
	/remote-source/app/cmd/thanos/compact.go:366 +0x29a
github.com/oklog/run.(*Group).Run.func1(0xc0001f9f20, 0xc000c67e00, 0xc000b0ecb0)
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:37 +0xbb

Signed-off-by: Bartlomiej Plotka [email protected]

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/store/bucket.go Outdated Show resolved Hide resolved
pkg/store/bucket.go Outdated Show resolved Hide resolved
@yeya24 yeya24 mentioned this pull request Nov 18, 2020
```
caller=fetcher.go:700 msg="block has no labels left, creating one" replica=deduped
panic: assignment to entry in nil map
goroutine 441 [running]:
github.com/thanos-io/thanos/pkg/block.(*ReplicaLabelRemover).Modify(0xc000b19d70, 0x2b261e0, 0xc000c16d00, 0xc0008596e0, 0xc000b1a980, 0x0, 0x0)
	/remote-source/app/pkg/block/fetcher.go:701 +0x3cf
github.com/thanos-io/thanos/pkg/block.(*BaseFetcher).fetch(0xc000d75d40, 0x2b261e0, 0xc000c16d00, 0xc000c16a40, 0xc000c16a00, 0x4, 0x4, 0xc000b0e590, 0x1, 0x1, ...)
	/remote-source/app/pkg/block/fetcher.go:441 +0x65d
github.com/thanos-io/thanos/pkg/block.(*MetaFetcher).Fetch(0xc0002fe480, 0x2b261e0, 0xc000c16d00, 0x5528a0, 0xc000c16340, 0xc0005c6000, 0x8)
	/remote-source/app/pkg/block/fetcher.go:474 +0x9f
github.com/thanos-io/thanos/pkg/compact.(*Syncer).SyncMetas(0xc000c67d80, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:127 +0xc0
github.com/thanos-io/thanos/pkg/compact.(*BucketCompactor).Compact(0xc0002fed20, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:945 +0x2c2
main.runCompact.func6(0xc000501c80, 0x0)
	/remote-source/app/cmd/thanos/compact.go:307 +0x15a
main.runCompact.func7.1(0xc0006bbd70, 0xc000bbe0a0)
	/remote-source/app/cmd/thanos/compact.go:367 +0x99
github.com/thanos-io/thanos/pkg/runutil.Repeat(0x45d964b800, 0xc00005a660, 0xc0007e9f30, 0x0, 0x0)
	/remote-source/app/pkg/runutil/runutil.go:72 +0x91
main.runCompact.func7(0x0, 0x0)
	/remote-source/app/cmd/thanos/compact.go:366 +0x29a
github.com/oklog/run.(*Group).Run.func1(0xc0001f9f20, 0xc000c67e00, 0xc000b0ecb0)
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:37 +0xbb

```

Signed-off-by: Bartlomiej Plotka <[email protected]>
@bwplotka bwplotka merged commit b4d2750 into master Nov 18, 2020
@bwplotka bwplotka deleted the fixed-meta-bug branch November 18, 2020 17:39
Oghenebrume50 pushed a commit to Oghenebrume50/thanos that referenced this pull request Dec 7, 2020
…hanos-io#3461)

```
caller=fetcher.go:700 msg="block has no labels left, creating one" replica=deduped
panic: assignment to entry in nil map
goroutine 441 [running]:
github.com/thanos-io/thanos/pkg/block.(*ReplicaLabelRemover).Modify(0xc000b19d70, 0x2b261e0, 0xc000c16d00, 0xc0008596e0, 0xc000b1a980, 0x0, 0x0)
	/remote-source/app/pkg/block/fetcher.go:701 +0x3cf
github.com/thanos-io/thanos/pkg/block.(*BaseFetcher).fetch(0xc000d75d40, 0x2b261e0, 0xc000c16d00, 0xc000c16a40, 0xc000c16a00, 0x4, 0x4, 0xc000b0e590, 0x1, 0x1, ...)
	/remote-source/app/pkg/block/fetcher.go:441 +0x65d
github.com/thanos-io/thanos/pkg/block.(*MetaFetcher).Fetch(0xc0002fe480, 0x2b261e0, 0xc000c16d00, 0x5528a0, 0xc000c16340, 0xc0005c6000, 0x8)
	/remote-source/app/pkg/block/fetcher.go:474 +0x9f
github.com/thanos-io/thanos/pkg/compact.(*Syncer).SyncMetas(0xc000c67d80, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:127 +0xc0
github.com/thanos-io/thanos/pkg/compact.(*BucketCompactor).Compact(0xc0002fed20, 0x2b261e0, 0xc000c16d00, 0x0, 0x0)
	/remote-source/app/pkg/compact/compact.go:945 +0x2c2
main.runCompact.func6(0xc000501c80, 0x0)
	/remote-source/app/cmd/thanos/compact.go:307 +0x15a
main.runCompact.func7.1(0xc0006bbd70, 0xc000bbe0a0)
	/remote-source/app/cmd/thanos/compact.go:367 +0x99
github.com/thanos-io/thanos/pkg/runutil.Repeat(0x45d964b800, 0xc00005a660, 0xc0007e9f30, 0x0, 0x0)
	/remote-source/app/pkg/runutil/runutil.go:72 +0x91
main.runCompact.func7(0x0, 0x0)
	/remote-source/app/cmd/thanos/compact.go:366 +0x29a
github.com/oklog/run.(*Group).Run.func1(0xc0001f9f20, 0xc000c67e00, 0xc000b0ecb0)
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:38 +0x27
created by github.com/oklog/run.(*Group).Run
	/remote-source/deps/gomod/pkg/mod/github.com/oklog/[email protected]/group.go:37 +0xbb

```

Signed-off-by: Bartlomiej Plotka <[email protected]>
Signed-off-by: Oghenebrume50 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants