Skip to content

Materialize: Wait for tables to become visible after creation#1320

Open
mrigger wants to merge 1 commit intomainfrom
fix/materialize-eventual-consistency-retry
Open

Materialize: Wait for tables to become visible after creation#1320
mrigger wants to merge 1 commit intomainfrom
fix/materialize-eventual-consistency-retry

Conversation

@mrigger
Copy link
Copy Markdown
Contributor

@mrigger mrigger commented Apr 10, 2026

Retry readSchema until it succeeds.

@mrigger mrigger force-pushed the fix/materialize-eventual-consistency-retry branch from 1f4f51c to 5859896 Compare April 10, 2026 15:39
Materialize exhibits eventual consistency where a table can appear in
information_schema.tables before its columns are visible in
INFORMATION_SCHEMA.COLUMNS. Since readSchema fetches these in separate
queries, any updateSchema() call can produce a snapshot with tables
that have empty column lists, causing crashes throughout execution
(e.g., see https://github.com/sqlancer/sqlancer/actions/runs/24169417215/job/70537769855).

Fix this by retrying in readSchema itself until the snapshot is
consistent (all tables have at least one column), so every
updateSchema() call is guaranteed to return a usable schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrigger mrigger force-pushed the fix/materialize-eventual-consistency-retry branch from 5859896 to efa6d46 Compare April 11, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant