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 <[email protected]>
  • Loading branch information
bwplotka committed Jan 3, 2020
1 parent 4d50c88 commit c12fda9
Show file tree
Hide file tree
Showing 9 changed files with 778 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit c12fda9

Please sign in to comment.