FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix Materialize CI: retry readSchema to handle eventual consistency by mrigger · Pull Request #1332 · sqlancer/sqlancer · GitHub

Fix Materialize CI: retry readSchema to handle eventual consistency - #1332

Merged
mrigger merged 3 commits into
mainfrom
fix/materialize-eventual-consistency
Apr 25, 2026
Merged

Fix Materialize CI: retry readSchema to handle eventual consistency#1332
mrigger merged 3 commits into
mainfrom
fix/materialize-eventual-consistency

Conversation

mrigger commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

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.

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 b5c8bf6 to e81ffd1 Compare April 20, 2026 15:33
mrigger requested a review from def- April 20, 2026 16:22

mrigger commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

@def-, this seems to address the issue behind #1307. Not sure if the eventual consistency reason that Claude came up with is the real root cause of this, or whether this could be a bug in Materialize?

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That's not correct. The information_schema is strongly consistent. I'm not sure what's going wrong though!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Merging this for now, as it will make the CI test green and would allows us to catch any other issues.

mrigger and others added 2 commits April 22, 2026 00:35
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>
mrigger merged commit 1135357 into main Apr 25, 2026
23 of 26 checks passed
mrigger deleted the fix/materialize-eventual-consistency branch April 25, 2026 07:10
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL