Skip to content

refactor: remove deprecated curator ServiceAnnouncer stuff#19523

Open
clintropolis wants to merge 3 commits into
apache:masterfrom
clintropolis:remove-service-announcer
Open

refactor: remove deprecated curator ServiceAnnouncer stuff#19523
clintropolis wants to merge 3 commits into
apache:masterfrom
clintropolis:remove-service-announcer

Conversation

@clintropolis
Copy link
Copy Markdown
Member

@clintropolis clintropolis commented May 27, 2026

Description

This PR removes the org.apache.druid.curator.discovery.ServiceAnnouncer, and is the third in a series of ZooKeeper cleanup PRs following #19377 and #19500. This ServiceAnnouncer/CuratorServiceAnnouncer stuff (not to be confused with org.apache.druid.curator.announcement.ServiceAnnouncer) used the curator-x-discovery library to write service announcements, but nothing in production paths was reading them:

  • leader discovery uses DruidLeaderSelector (curator leader latch) + the /v1/leader HTTP endpoint, not this stuff
  • task-to-task communication uses TaskLocation (host:port reported via UpdateLocationAction) + the X-Druid-Task-Id header, not this stuff
  • Node-level discovery runs through DruidNodeAnnouncer + DruidNodeDiscoveryProvider, not this stuff

The only consumer of ServiceDiscovery.queryForInstances() in the repo was ServiceAnnouncerTest, verifying its own writes.

The ChatHandlerProvider interface has been simplified, as the 3-arg register(key, handler, boolean announce) method was only meaningful when there was an external announce side, and the interface has been collapsed into just a class ChatHandlerProvider since without the production ServiceAnnouncingChatHandlerProvider doing a bunch of curator stuff it is just a simple registry, making the no-op implementation unecessary.

Release note

Removed deprecated legacy ZooKeeper service announcement that was using the curator-x-discovery library. The library dependency has also been removed. The following configs have been removed and will be ignored:

  • druid.discovery.curator.path
  • druid.discovery.curator.useDiscovery
  • druid.indexer.task.chathandler.type
  • druid.indexer.chathandler.publishDiscovery

Copy link
Copy Markdown
Member

@FrankChen021 FrankChen021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Reviewed 52 of 52 changed files.


This is an automated review by Codex GPT-5.5

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