With the CentralizedDatasourceSchema feature, Broker polls datasource schema from the Coordinator.
Datasource schema could be temporarily empty on the Broker in the following scenario,
Metadata querying is disabled on the Broker.
New datasource is added.
Both Broker and Coordinator tries to build the datasource schema.
Broker builds empty datasource schema, since none of the segments has a schema on the Broker.
Schema on the Broker is correctly updated after poll from the Coordinator.
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.
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.