Repository navigation
Conversation
Select immutable inserts by their creation block and omit immutable tables from deletion queries. Cover mixed and immutable-only schemas. Fixes graphprotocol#4433.
This branch has not been deployed
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.
Fixes #4433.
entityChangesInBlockqueriesblock_rangefor every table, but immutable entities store their creation block inblock$. Any immutable entity in the schema therefore makes the query fail.Use
block$to select immutable inserts and exclude immutable tables from the deletion query. Add PostgreSQL regressions for mixed mutable/immutable schemas and immutable-only schemas, including updates, deletions and blocks with no changes. Both new tests fail on master with the missing-column error and pass with this change.Validation on macOS arm64 with PostgreSQL 18:
cargo fmt --alljust lint --locked -- -D warningscargo check --locked --releasecargo nextest run --locked --workspace --exclude graph-tests --test-threads 1 --no-fail-fast: 1,468 passed, 3 existing skips.The regular
just test-unitrunner hit IPFS mock-server request-count failures; the workspace passes with nextest's process isolation. The CLI build test also returns early after an npm install error in this environment, so codegen/build was checked separately and the resulting Wasm module validated.