Skip to content

Commit

Permalink
Added single block.MetaFetcher logic for resilient sync of meta files.
Browse files Browse the repository at this point in the history
This is meant to replace many inconsistent meta.json syncs places in other components.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Jan 3, 2020
1 parent 50ed556 commit 6a6ae35
Show file tree
Hide file tree
Showing 9 changed files with 778 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan
We use *breaking* word for marking changes that are not backward compatible (relates only to v0.y.z releases.)

## Unreleased

### Fixed

- [#1856](https://github.com/thanos-io/thanos/pull/1856) Receive: close DBReadOnly after flushing to fix a memory leak.
Expand Down
7 changes: 1 addition & 6 deletions pkg/block/block_test.go
Expand Up @@ -20,8 +20,6 @@ import (
"github.com/oklog/ulid"
)

// NOTE(bplotka): For block packages we cannot use testutil, because they import block package. Consider moving simple
// testutil methods to separate package.
func TestIsBlockDir(t *testing.T) {
for _, tc := range []struct {
input string
Expand Down Expand Up @@ -58,10 +56,7 @@ func TestIsBlockDir(t *testing.T) {
} {
t.Run(tc.input, func(t *testing.T) {
id, ok := IsBlockDir(tc.input)
if ok != tc.bdir {
t.Errorf("expected block dir != %v", tc.bdir)
t.FailNow()
}
testutil.Equals(t, tc.bdir, ok)

if id.Compare(tc.id) != 0 {
t.Errorf("expected %s got %s", tc.id, id)
Expand Down

0 comments on commit 6a6ae35

Please sign in to comment.