apache / druid

Apache Druid: a high performance real-time analytics database.
https://druid.apache.org/
Apache License 2.0
13.29k stars 3.66k forks source link

Fix empty datasource schema on the Broker when metadata query is disabled #16645

Closed findingrish closed 3 days ago

findingrish commented 6 days ago

With the CentralizedDatasourceSchema feature, Broker polls datasource schema from the Coordinator.

Datasource schema could be temporarily empty on the Broker in the following scenario,

In the period between Broker building empty datasource schema and polling correct schema from the Coordinator, queries start to fail with column not found exception.

The fix is to avoid caching any datasource schema which is empty.

This PR also updates the datasource readiness check in the Standard ITs to ensure that the datasource schema is non-empty.