Skip to content

Wait for SQL table visibility in embedded tests.#19095

Merged
gianm merged 3 commits intoapache:masterfrom
gianm:et-flaky
Mar 5, 2026
Merged

Wait for SQL table visibility in embedded tests.#19095
gianm merged 3 commits intoapache:masterfrom
gianm:et-flaky

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Mar 5, 2026

Several embedded tests wait for segment/schemaCache/refresh/count as a proxy for when a datasource is queryable via SQL. However, this metric is emitted before the SQL table is set up. This creates a window where SQL queries can fail with "Object 'datasource' not found".

This patch waits for segment/schemaCache/rowSignature/column/count, which is emitted after a SQL table is set up and visible. This is done either as a replacement for segment/schemaCache/refresh/count (if we only care about table visibility) or in addition to it (if we also want to wait for a specific number of segments to be detected).

Several embedded tests wait for segment/schemaCache/refresh/count as a
proxy for when a datasource is queryable via SQL. However, this metric
is emitted before the SQL table is set up. This creates a window where
SQL queries can fail with "Object 'datasource' not found".

This patch waits for segment/schemaCache/rowSignature/column/count,
which is emitted after a SQL table is set up and visible. This is done
either as a replacement for segment/schemaCache/refresh/count (if we
only care about table visibility) or in addition to it (if we also want
to wait for a specific number of segments to be detected).
@gianm gianm merged commit b6a6c97 into apache:master Mar 5, 2026
37 checks passed
@gianm gianm deleted the et-flaky branch March 5, 2026 20:16
@github-actions github-actions bot added this to the 37.0.0 milestone Mar 5, 2026
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.

2 participants