-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Skip SortingDigest
when merging a large digest in HybridDigest
#97099
Conversation
This is a small performance optimization that avoids creating an intermediate SortingDigest when merging a digest tracking many samples. The current behavior is to keep adding values to SortingDigest until we cross the threshold for switching to MergingDigest, at which point we copy all values from SortingDigest to MergingDigest and release the former. As a side cleanup, remove the methods for adding a list of digests. It's not used anywhere and it can be tricky to get right - the current implementation for HybridDigest is buggy.
Hi @kkrik-es, I've created a changelog YAML for you. |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
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.
LGTM
This feels more like a hybrid tdigest bug fix to me? If so I think we should back port this to 8.9 branch.
Agreed. |
…lastic#97099) * Skip SortingDigest when merging a large digest in HybridDigest. This is a small performance optimization that avoids creating an intermediate SortingDigest when merging a digest tracking many samples. The current behavior is to keep adding values to SortingDigest until we cross the threshold for switching to MergingDigest, at which point we copy all values from SortingDigest to MergingDigest and release the former. As a side cleanup, remove the methods for adding a list of digests. It's not used anywhere and it can be tricky to get right - the current implementation for HybridDigest is buggy. * Update docs/changelog/97099.yaml
💚 Backport successful
|
…97099) (#97106) * Skip SortingDigest when merging a large digest in HybridDigest. This is a small performance optimization that avoids creating an intermediate SortingDigest when merging a digest tracking many samples. The current behavior is to keep adding values to SortingDigest until we cross the threshold for switching to MergingDigest, at which point we copy all values from SortingDigest to MergingDigest and release the former. As a side cleanup, remove the methods for adding a list of digests. It's not used anywhere and it can be tricky to get right - the current implementation for HybridDigest is buggy. * Update docs/changelog/97099.yaml
This is a small performance optimization that avoids creating an intermediate
SortingDigest
when merging a digest with many samples. The current behavior is to keep adding values toSortingDigest
until we cross the threshold for switching toMergingDigest
, at which point we copy all values fromSortingDigest
toMergingDigest
and release the former.As a side cleanup, remove the methods for merging a list of digests. They are not used anywhere and can be tricky to get right - the current implementation for HybridDigest is buggy.