You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix TDigest::merge using oversized vectors of centroids
Summary:
When joining multiple `TDigest` instances into one using `TDigest::merge(Range<const TDigest*>)`, more than `maxSize` elements appear in the `centroids` vector periodically. This happens because of the missing `k_limit` increment during `q_limit_times_count` initialisation. This diff fixes it.
It is hard to say if this bug causes any issues with the precision of the highest percentiles. But it causes some performance degradation: unplanned multiple merging, additional vector resizes etc. It can also lead to more serious bugs as nobody expects the centroids vector to be bigger than was specified.
Reviewed By: yfeldblum
Differential Revision: D71970273
fbshipit-source-id: 2fea55846426a9986d3d0854b387d321b6e31ed1
0 commit comments