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 instanceTopologyMap creation noisy logs #2688

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

zpinto
Copy link
Contributor

@zpinto zpinto commented Nov 2, 2023

Issues

  • Fix condition to check if DOMAIN has all required TOPOLOGY keys and allows for extra kv pairs, to reduce noisy logs.

Description

When DOMAIN has more kv pairs than the ones required in TOPOLOGY(non-WAGED cases only), we log an incorrect warn message. When there are extra kv pairs, this check to see if numOfMatchedKeys == domainAsMap.size() is false because not all keys in DOMAIN are used.

This leads to huge log flooding. The check above is incorrect, as it should be okay to have extra kv pairs in DOMAIN as long as the required kv pairs exist. The check should be (numOfMatchedKeys < clusterTopologyConfig.getTopologyKeyDefaultValue().size()), so it only warns if DOMAIN does not contain the required topology keys.

Tests

Current tests should cover this.

Changes that Break Backward Compatibility (Optional)

NA

Documentation (Optional)

NA

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":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. 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)

…llows for extra kv pairs, to reduce noisy logs.
@zpinto zpinto marked this pull request as ready for review November 2, 2023 06:03
@zpinto
Copy link
Contributor Author

zpinto commented Nov 2, 2023

Failed CI due to flaky test testDistributedController #2498

This PR is ready to be merged.

Final Commit Message:
Fix incorrect condition to check if DOMAIN has all required TOPOLOGY keys and allows for extra kv pairs, to reduce noisy logs.

@xyuanlu xyuanlu merged commit 7f2a88d into apache:master Nov 2, 2023
2 of 3 checks passed
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