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

Fix bug in auto compaction preserveExistingMetrics feature #12438

Merged
merged 3 commits into from
Apr 15, 2022

Conversation

maytasm
Copy link
Contributor

@maytasm maytasm commented Apr 14, 2022

Fix bug in auto compaction preserveExistingMetrics feature

Description

This PR contains the following changes:

  • Auto compaction should not set preserveExistingMetrics if metricsSpec is not explicitly set in auto compaction config. This falls back to current behavior before metricsSpec was added to auto compaction and Compaction task would be able to automatically discover and generate the correct combining metricsSpec without needing to use preserveExistingMetrics function
  • When preserveExistingMetrics is use, some Aggregators may return different Type in it's Combine method. For example, the FloatSum takes in two Float but returns a Double in its Combine method. This PR handle this case by converting the returned Object to a Number object then calling the Number Object's method to get the correct Type value.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@maytasm maytasm merged commit c25a556 into apache:master Apr 15, 2022
@maytasm maytasm deleted the fix_bug_metricsSpec branch April 15, 2022 22:47
@abhishekagarwal87 abhishekagarwal87 added this to the 0.23.0 milestone May 11, 2022
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.

3 participants