Skip to content

persist: Refetch state before reporting a schema as unregistered - #40556

Open
def- wants to merge 2 commits into
MaterializeInc:mainfrom
def-:pr-per-130
Open

def- wants to merge 2 commits into
MaterializeInc:mainfrom
def-:pr-per-130

Conversation

@def-

@def- def- commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Machine::register_schema answered from cached state, which can predate another process's compare_and_evolve_schema. The writer then saw its evolved schema as unregistered and compare_and_append_batch panicked with "fetching a schema id should only fail when the shard is tombstoned", e.g. on a replica creating an index right after ALTER TABLE ... ADD COLUMN.

Nightly run: https://buildkite.com/materialize/nightly/builds/18698 (edit: still fails in upgrade tests because we run the old code there) & https://buildkite.com/materialize/nightly/builds/18699 (edit: green (modulo the other failure fixed in another PR))

Closes: PER-130

`Machine::register_schema` answered from cached state, which can predate
another process's `compare_and_evolve_schema`. The writer then saw its
evolved schema as unregistered and `compare_and_append_batch` panicked
with "fetching a schema id should only fail when the shard is
tombstoned", e.g. on a replica creating an index right after
`ALTER TABLE ... ADD COLUMN`.

Closes: PER-130

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@def-
def- requested a review from a team as a code owner November 7, 2026 06:11
@def-
def- requested review from DAlperin and mtabebe November 7, 2026 06:12
@def-
def- requested a review from a team as a code owner November 7, 2026 07:16

This branch has not been deployed

No deployments
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