Fix Materialize CI: retry readSchema to handle eventual consistency - #1332
Merged
Merged
Conversation
Materialize's information_schema is eventually consistent — tables and columns may not be visible immediately after creation. This caused IndexOutOfBoundsException when generators called getRandomTable() on an empty or incomplete schema. Retry readSchema() until the snapshot has no tables with empty columns, the table count has not regressed, and — after the initial read — the table list is not suspiciously empty. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mrigger
force-pushed
the
fix/materialize-eventual-consistency
branch
from
April 20, 2026 15:33
b5c8bf6 to
e81ffd1
Compare
Contributor
Author
def-
reviewed
Apr 21, 2026
Comment on lines
+271
to
+273
| // Materialize's information_schema is eventually consistent: tables and columns | ||
| // may not be visible immediately after creation. Retry until the snapshot is | ||
| // consistent. |
Collaborator
There was a problem hiding this comment.
That's not correct. The information_schema is strongly consistent. I'm not sure what's going wrong though!
Contributor
Author
There was a problem hiding this comment.
Thanks, I've fixed the comment. I think it's quite likely that this is an issue within Materialize. I could not reproduce it locally, though. Perhaps we can operate under the assumption that it is a bug for now and use the workaround proposed in this PR, or what do you think?
Contributor
Author
There was a problem hiding this comment.
Merging this for now, as it will make the CI test green and would allows us to catch any other issues.
Remove incorrect claim about eventual consistency in readSchema comment. Add MaterializeBugs class with bugSchemaReadIncomplete flag to guard the retry logic, following the MySQLBugs pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Materialize's information_schema is eventually consistent — tables and columns may not be visible immediately after creation. This caused IndexOutOfBoundsException when generators called getRandomTable() on an empty or incomplete schema. Retry readSchema() until the snapshot has no tables with empty columns and the table count has not regressed.