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

store: support serving downsampled data from bucket #191

Merged
merged 2 commits into from
Jan 30, 2018
Merged

Conversation

fabxc
Copy link
Collaborator

@fabxc fabxc commented Jan 18, 2018

@Bplotka

Definitely some tests missing overall – will add some later.

@fabxc fabxc changed the base branch from master to downsamplefixes January 18, 2018 11:10
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.

Nice! However, can see some potential bugs here

chks []storepb.AggrChunk
set []seriesEntry
i int
// chks []storepb.AggrChunk
Copy link
Member

Choose a reason for hiding this comment

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

do we need this comment?

if err != nil {
return errors.Errorf("aggregate %s does not exist", downsample.AggrSum)
}
out.Count = &storepb.Chunk{Type: storepb.Chunk_XOR, Data: x.Bytes()}
Copy link
Member

Choose a reason for hiding this comment

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

out.Count ??
Not out.Sum?


// getFor returns a time-ordered list of blocks that cover date between mint and maxt.
// Blocks with the lowest resolution possible but not lower than the given resolution are returned.
func (s *bucketBlockSet) getFor(mint, maxt, minResolution int64) (bs []*bucketBlock) {
Copy link
Member

Choose a reason for hiding this comment

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

how we got from req.MaxResolutionWindow to this minResolution name here? Also

for ; i < len(s.resolutions) && s.resolutions[i] > minResolution; i++ {}

Min resolution make sense here, but we are putting max Resolution in this parameter... Not sure what's going on here ^^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's essentially the issue about intuitively of naming we ran into before. MaxResolutionWindow and minResolution are in fact the same thing. If we set an upper bound on how big the window we aggregate over is that implies a minimum resolution we want to guarantee. If we made the window bigger, resolution would decrease.

@fabxc fabxc force-pushed the downsamplefixes branch 4 times, most recently from 3ecb602 to 9359c8c Compare January 29, 2018 12:56
@fabxc fabxc changed the base branch from downsamplefixes to master January 29, 2018 15:58
@fabxc fabxc force-pushed the downstore branch 2 times, most recently from 134d1cc to 85bb165 Compare January 29, 2018 18:15
@fabxc
Copy link
Collaborator Author

fabxc commented Jan 29, 2018

Fixed and added some tests.

@fabxc
Copy link
Collaborator Author

fabxc commented Jan 30, 2018

Gave this another review myself. I'll merge this now. There's one remaining comment on the naming confusion. If we come up with a better variant we can always change this later.

@fabxc fabxc merged commit c50c3e4 into master Jan 30, 2018
@fabxc fabxc deleted the downstore branch January 30, 2018 08:49
@bwplotka
Copy link
Member

Oke (:

@fabxc
Copy link
Collaborator Author

fabxc commented Jan 30, 2018

Is skiing weather so bad that you are on GH instead on 11am :P?

fpetkovski pushed a commit to fpetkovski/thanos that referenced this pull request Jan 26, 2024
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