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

labelbp: Renamed Label->Zlabel, and FullCopyLabel -> Label. #3330

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

bwplotka
Copy link
Member

No logic changed. Also commented the caution.
Split of #3279
ZLabel vs Label:

/tmp/___BenchmarkZLabelsMarshalUnmarshal_in_github_com_thanos_io_thanos_pkg_store_labelpb -test.v -test.bench ^\QBenchmarkZLabelsMarshalUnmarshal\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/store/labelpb
BenchmarkZLabelsMarshalUnmarshal
BenchmarkZLabelsMarshalUnmarshal/Label
BenchmarkZLabelsMarshalUnmarshal/Label-12         	       8	 133253790 ns/op	212008374 B/op	 1000005 allocs/op
BenchmarkZLabelsMarshalUnmarshal/ZLabel
BenchmarkZLabelsMarshalUnmarshal/ZLabel-12        	       9	 121597711 ns/op	100008368 B/op	       5 allocs/op
PASS

Process finished with exit code 0

@bwplotka bwplotka changed the title labelbp: Renamed Label->Zlabel, and FullCopyLabel to Label. labelbp: Renamed Label->Zlabel, and FullCopyLabel -> Label. Oct 16, 2020
No logic changed. Also commented the caution.

ZLabel vs Label:

```
/tmp/___BenchmarkZLabelsMarshalUnmarshal_in_github_com_thanos_io_thanos_pkg_store_labelpb -test.v -test.bench ^\QBenchmarkZLabelsMarshalUnmarshal\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/store/labelpb
BenchmarkZLabelsMarshalUnmarshal
BenchmarkZLabelsMarshalUnmarshal/Label
BenchmarkZLabelsMarshalUnmarshal/Label-12         	       8	 133253790 ns/op	212008374 B/op	 1000005 allocs/op
BenchmarkZLabelsMarshalUnmarshal/ZLabel
BenchmarkZLabelsMarshalUnmarshal/ZLabel-12        	       9	 121597711 ns/op	100008368 B/op	       5 allocs/op
PASS

Process finished with exit code 0
```


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

@brancz brancz left a comment

Choose a reason for hiding this comment

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

lgtm

@brancz brancz merged commit 4b89eea into master Oct 16, 2020
@brancz brancz deleted the rename-zlabels branch October 16, 2020 12:54
string Error = 4 [(gogoproto.jsontag) = "error,omitempty"];
string Status = 1 [(gogoproto.jsontag) = "status"];
// TODO(bwplotka): Experiment with ZLabelSet here.
repeated thanos.LabelSet Data = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "data"];
Copy link
Contributor

@yeya24 yeya24 Nov 19, 2020

Choose a reason for hiding this comment

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

This change from FullCopyLabelSet to thanos.LabelSet causes the bug of #3465, which returns nil when unmarshalling responses here.

However, another pr fixes this by changing thanos.LabelSet to thanos.ZLabelSet, @bwplotka any idea why LabelSet has problem unmarshalling while ZLabelSet doesn't have this problem?

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.

None yet

3 participants