The metric "MissingTopState" is not being calculated (hence not reported) as an exception is thrown prior to metric calculation in the ResourceMonitor.
Whenever the replica is set to ANY_LIVEINSTANCE, we encounter a NumberFormatException and return (as we try to get the replica count as Integer) before calculating rest of the metrics which includes the _numNonTopStatePartitions.
Changes that Break Backward Compatibility (Optional)
My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
In case of new functionality, my PR adds documentation in the following wiki page:
(Link the GitHub wiki you added)
Commits
My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"
Code Quality
My diff has been formatted using helix-style.xml
(helix-style-intellij.xml if IntelliJ IDE is used)
Issues
Fixes #2803
Description
The metric "MissingTopState" is not being calculated (hence not reported) as an exception is thrown prior to metric calculation in the ResourceMonitor.
Whenever the replica is set to ANY_LIVEINSTANCE, we encounter a NumberFormatException and return (as we try to get the replica count as Integer) before calculating rest of the metrics which includes the _numNonTopStatePartitions.
Tests
mvn test -o -Dtest=TestResourceMonitor -pl=helix-core
Changes that Break Backward Compatibility (Optional)
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality