Skip to content

Reduce log noise for k8s NodeRoleWatcher - #19077

Merged
capistrant merged 1 commit into
apache:masterfrom
capistrant:kubernetes-extension-role-watch-fixer
Mar 4, 2026
Merged

capistrant merged 1 commit into
apache:masterfrom
capistrant:kubernetes-extension-role-watch-fixer

Conversation

@capistrant

Copy link
Copy Markdown
Contributor

Description

  • When using druid-kubernetes-extensions for node discovery, the K8s watch loop replays ADDED events for existing pods on every reconnect. This caused BaseNodeRoleWatcher.addNode() to log at ERROR level for each
    duplicate, polluting logs with non-actionable noise.
  • Downgraded the "discovered but existed already" log from ERROR to DEBUG, since duplicate adds are expected behavior during watch reconnects.
  • Moved the INFO "Node detected" log into addNode() so it only fires for genuinely new nodes, not duplicates.
  • Added a test covering the reconnect scenario (resetNodes followed by duplicate childAdded calls).

Release note

N/A


Key changed/added classes in this PR
  • BaseNodeRoleWatcher

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • 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.

@capistrant
capistrant merged commit 010be96 into apache:master Mar 4, 2026
62 of 63 checks passed
@cecemei cecemei added this to the 37.0.0 milestone Apr 8, 2026
vivek807 pushed a commit to deep-bi/druid that referenced this pull request Sep 1, 2026
airlock-confluentinc Bot pushed a commit to confluentinc/druid that referenced this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants