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

Merge release-0.12 into master #2441

Merged
merged 11 commits into from
Apr 15, 2020
Merged

Merge release-0.12 into master #2441

merged 11 commits into from
Apr 15, 2020

Conversation

squat
Copy link
Member

@squat squat commented Apr 15, 2020

This PR merges the release-0.12 branch into master.

cc @thanos-io/thanos-maintainers

squat and others added 11 commits April 2, 2020 18:13
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
We got booted from the GCS account, so skip this in CI for now.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
* binaryHeader: Fixed partial write issue for index-header.

Fixes thanos-io#2213

This caused was indicated as regression of latency, and also causes potential critical issue
for store GW, where manual delete of index-header from local storage was required.

This might be considered as blocker for 0.12, so it would be worth to port it to 0.12 TBH @squat.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* binary_reader: ensure fs is synced before renaming

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
…ion (e.g not increment failures for expected not found) (thanos-io#2383)

* objstore: Added WithExpectedErrs to Reader which allows to control instrumentation (e.g not increment failures for expected not found).

This allows to not wake up oncall in the middle of night, becuase of expeced, properly handled case (:

Also: Has to move inmem to objstore for testing.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* pkg/objstore: fix NewBucket comments.

This commit fixes the documentation comments for the NewBucket funcs.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
… block deletion logic, made meta sync explicit. (thanos-io#2385)

Also:

* Changed order: Now BestEffortCleanAbortedPartialUploads is before DeleteMarkedBlocks.
* Increment markedForDeletion counter only when we actually uploaded block.
* Fixed logging issues.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…pt in memory instead of 1/32 as we meant. (thanos-io#2390)

* store: Fixed binary header bug that was causing all postings to be kept in memory instead of 1/32 as we meant.

Spotted by @mkabischev! Thanks to you and @d-ulyanov as well! Epic finding +1


Test output before fix:
					testutil.Equals(t, 1, br.version)
					testutil.Equals(t, 2, br.indexVersion)
					testutil.Equals(t, &BinaryTOC{Symbols: headerLen, PostingsOffsetTable: 66}, br.toc)
					testutil.Equals(t, int64(626), br.indexLastPostingEnd)
					testutil.Equals(t, 8, br.symbols.Size())
					testutil.Equals(t, map[string]*postingValueOffsets{
						"": {
							offsets:       []postingOffset{{value: "", tableOff: 4}},
							lastValOffset: 392,
						},
						"a": {
							offsets: []postingOffset{
								{value: "1", tableOff: 9},
								{value: "11", tableOff: 16},
								{value: "12", tableOff: 24},
								{value: "2", tableOff: 32},
								{value: "3", tableOff: 39},
								{value: "4", tableOff: 46},
								{value: "5", tableOff: 53},
								{value: "6", tableOff: 60},
								{value: "7", tableOff: 67},
								{value: "8", tableOff: 74},
								{value: "9", tableOff: 81},
							},
							lastValOffset: 572,
						},
						"longer-string": {
							offsets:       []postingOffset{{value: "1", tableOff: 88}},
							lastValOffset: 622,
						},
					}, br.postings)
					testutil.Equals(t, 0, len(br.postingsV1))
					testutil.Equals(t, 2, len(br.nameSymbols))

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Added CHANGELOG item.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Fixed build errs.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Addressed Lucas comment.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…s causing "invalid size" error. (thanos-io#2393)

Reason why we could not reproduce it locally was that for most of non-existing value
we were lucky that buffer was still long enough and we could read and decode some (malformed) variadic type.
For certain rare cases, buffer was not long enough.

Fixed and spotted thanks to amazing @mkabischev!

* Added more regression tests for binary header.

Without the fix it fails with:
```
            header_test.go:154: header_test.go:154:

                	exp: range not found

                	got: get postings offset entry: invalid size
```

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM (:

@bwplotka
Copy link
Member

Thanks!

@squat squat merged commit 209fd88 into thanos-io:master Apr 15, 2020
@squat squat deleted the merge-0.12 branch April 15, 2020 13:28
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