CuratorInventoryManager may not report inventory as initialized
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 209
Description
The reason is unclear, but we've seen brokers running 0.12.1 fail to report "Inventory Initialized" events even after running for long periods of time. Nevertheless, the broker seems to be able to do native queries normally, and seems to be properly aware of all historicals. Restarting the broker generally clears this up. It seems to be somewhat random whether or not this will occur on any given broker startup.
This has one knock-on effect: DruidSchema (the SQL layer's metadata cache) doesn't activate until after inventory is initialized, and so this blocks the SQL layer from working. It just reports that there are no tables.
Checking /druid/broker/v1/loadstatus returns false when the broker is in this state.
Contributor guide
Research direction
Start with CuratorInventoryManager and trace how the broker emits the "Inventory Initialized" event and reports /druid/broker/v1/loadstatus. Then inspect DruidSchema activation, using the described failure where native queries work but SQL reports no tables. Done should cover the affected broker startup path so inventory initializes and the SQL metadata cache becomes available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100