-
Notifications
You must be signed in to change notification settings - Fork 10
A whisper of many aggregation policies (with percentiles) #5
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
Conversation
|
Very cool idea, like it! |
|
@deniszh uncompressed format will be very expensive to keep around with all aggregations enabled, but compressed shouldn't be that much a blow and makes a perfect sense. |
|
@deniszh I think @bom-d-van already answered your question: However the question is if it's feasible to do that? I would also assume that the change is not backward compatible and will require some conversion, at least upgrading metadata to follow the same format as compressed one, right? (sorry, I haven't read the code yet) |
|
Nah, I'm totally fine with that, just overlooked in the initial description. |
Off the top of my head, I think we could use the "mix" aggregation policy as a flag to differentiate new and old whisper files, but I could be wrong. However, conversion shouldn't be necessary, because unlike compressed format, it isn't attempting to convert historical data to mix policy. Nice to see welcoming opinions of this feature, the original idea of including all aggregation policies comes from @azhiltsov and Anna, I was only thinking of percentiles. :P |
|
If no conversion is required, then it need to be backward-compatible with Python whisper library (at least) and ideally with old go version. And I'm not sure how they will behave if it will spot extra archives. |
Yes, it is. All changes made in go-whisper so far maintain backward compatibility. Changes could also be ported back to python library as well. I think these new designs/changes are beneficial in general. :) |
e29e05f to
7a3ba1c
Compare
7365a91 to
670e8ea
Compare
7728c3a to
f72e6ea
Compare
51a87a3 to
c8ca60d
Compare
c8ca60d to
ef630a1
Compare
* move most data structres in the closer places for readability. * bug fixes for fetch, propagation, and backfilling for mix aggregation. * fix tests for mix aggregation. * when fetching from lower archives, if the time range overlapped data in base/1st archive, cwhipser would do a dynamic filling (for both mix and classic aggregations). this would slow some reads but for good reason. * add cmd/read.go. * cmd/dump.go: print date times along side with timestamps.
ef630a1 to
93d9efc
Compare
e211f4b to
0776ac6
Compare
0776ac6 to
6941e73
Compare
@azhiltsov I've had people send the same metric multiple times with different postfixes so that they could have multiple aggregations. In this case it would actually be cheaper to have one metric with multiple aggregations. That said, I don't know if there are any reasons to not switch to compressed whisper if you need many aggs. |
…optimization * bug fix for no read backfilling when fetching lower archive data from new files
|
Hi all, it takes a long time to complete but finally I feel the changes are ready to be reviewed. Hope it could be both a good ending for 2019 and a good opening for 2020. :D As usual, it is designed and built for full backward compatibility and things should work as usual. |
Civil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. I've left 2 minor comments. Not really necessary to address any of them before merging this PR.
Early works, more stuff to come.
This PR aims at introducing a new aggregation policy: mix. With mix policy, you could aggregated data from base/first archive into multiple lower archives with the same precision.
This means that you could have more than one aggregation policy comparing to the classic whisper files.
Take the policy bellow as an example:
To use it in go-carbon, append the policy intended at the end of metric:
Drawback:
Merits:
Differences:
Currently only compressed format is supported, but it could be extended to standard format.