Skip to content

Set druid.announcer.skipSegmentAnnouncementOnZk to true by default#18445

Closed
maytasm wants to merge 1 commit intoapache:masterfrom
maytasm:disable_zk_segment
Closed

Set druid.announcer.skipSegmentAnnouncementOnZk to true by default#18445
maytasm wants to merge 1 commit intoapache:masterfrom
maytasm:disable_zk_segment

Conversation

@maytasm
Copy link
Copy Markdown
Contributor

@maytasm maytasm commented Aug 27, 2025

Set skipSegmentAnnouncementOnZk to true by default

Description

We have seen cases where a large number of watches in ZooKeeper causes performance issues. While there have been improvements, such as #17482, simply setting thedruid.announcer.skipSegmentAnnouncementOnZk configuration to true can significantly reduce unnecessary ZooKeeper watchers. Most users should already be using HTTP segment discovery, as it has been the default since v25. Therefore, switching the default value of this flag to true would benefit the community, as many users may not be aware of this configuration and have not overridden it to true.

Release note

The default value of druid.announcer.skipSegmentAnnouncementOnZk is now true, which means that Druid will no longer announce segments on ZooKeeper. As a result, ZooKeeper segment discovery will no longer work. (Since Druid v25, HTTP segment discovery has been the default instead of ZooKeeper segment discovery.) If you are already using HTTP segment discovery prior to this upgrade, no action is required. However, if you are upgrading from a cluster that still uses ZooKeeper segment discovery (i.e., version <25), or if you choose to continue using ZooKeeper segment discovery (by setting druid.serverview.type to batch), you must override druid.announcer.skipSegmentAnnouncementOnZk and set it to false.

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.

@kfaraz
Copy link
Copy Markdown
Contributor

kfaraz commented Aug 29, 2025

Changes look good, but the failures are genuine. @maytasm , could you please fix up the UTs ?

Publish results
  ℹ️ - Unit Test Report - 259692 tests run, 250426 passed, 9253 skipped, 13 failed.
     🧪 - BatchServerInventoryViewTest | BatchServerInventoryView is not updating
     🧪 - BatchServerInventoryViewTest | BatchServerInventoryView is not updating
     🧪 - BatchServerInventoryViewTest | BatchServerInventoryView is not updating
     🧪 - BatchServerInventoryViewTest | BatchServerInventoryView is not updating
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | expected:<2> but was:<0>
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id
     🧪 - BatchDataSegmentAnnouncerTest | expected:<1> but was:<0>
     🧪 - BatchDataSegmentAnnouncerTest | KeeperErrorCode = NoNode for /test/segments/id

@capistrant capistrant added the Upgrade note Behavior change that requires an upgrade note label Sep 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 2, 2025

This pull request has been marked as stale due to 60 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If you think
that's incorrect or this pull request should instead be reviewed, please simply
write any comment. Even if closed, you can still revive the PR at any time or
discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label Nov 2, 2025
@github-actions
Copy link
Copy Markdown

This pull request/issue has been closed due to lack of activity. If you think that
is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Documentation stale Upgrade note Behavior change that requires an upgrade note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants