-
Notifications
You must be signed in to change notification settings - Fork 121
Summary sketch #177
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
Summary sketch #177
Conversation
7d46006
to
c543f55
Compare
c543f55
to
be1a375
Compare
What problem are you trying to solve in this PR? |
Having quantile summaries entirely. The previous ones were known to be broken (see #170, #146, #159). My fix at #170 was just to stop it from breaking, but they were still not correct due to data-loss during race conditions, and surely not performant as they were doing lots of lookup-inserts of big data structures, when this PR does only |
303d6a4
to
c15728e
Compare
I've pushed a couple of changes to the default quantiles, in order not create any backwards incompatible change. As such, previously created quantiles using |
3783633
to
9b811a1
Compare
48ef3b5
to
98bcce4
Compare
9bf6c2c
to
46a742a
Compare
1388091
to
a877e3f
Compare
3e85a10
to
3a2a866
Compare
@paulo-ferraz-oliveira @lhoguin so, this has been in prod for a month already and it's working wonderfully 🔥 Maybe time to review and get it merged? PS: for the record, the current history is a mess because as there might be applications depending on the branch, force-pushing might break builds when the hash disappeared, so I've had to keep the history untouched. When merging, I'll need to squash-merge, and then ensure this branch doesn't disappear for at least a few months :) @mkuratczyk, when we merge this, we can release a new version together with all the latest versions of maps you've contributed recently too. v6 I suppose, as this is a breaking change? 🤔 |
Hello there, any available reviews here? 🙏🏽 |
maps support was not breaking (I hope :) ). I can try to review this PR in a few hours |
Well, probably. Going to review what we had so far and if I don't see anything breaking then will release 5.1.0 👌🏽 Thanks! :) |
I was keeping tabs on what was changing, and nothing surprised me, so I'm approving. |
d241931
Thanks for the approvals! Merged the latest master and fixed a documentation typo, will bypass stale reviews and merge, hopefully nobody has a problem with that :) |
This uses now ddskerl, an implementation of the DDSketch algorithm, instead of quantile_estimator, which is in turn an implementation of Cormode's biased algorithms.
The most important difference is that the biased algorithms aren't mathematically mergeable, hence keeping a per-scheduler summary would never work, and keeping a single global one would never scale (and not mentioning race conditions on inserts as the data-structure is not possible to treat atomically in an ets table). Instead, the DDSketch algorithm is fully mergeable, and the data structure implementation has an ETS backend fully tested for all sorts of race conditions.
As a possibility that is out of the scope of this PR, a custom exporter might provide the Sketch data structure to datadog, so that the quantile merges can be done on the server, and that way the metrics server can aggregate quantiles across many hosts in a meaningful way.