Repository navigation
Conversation
Copy subxip, subxcnt, and suboverflowed from the restored snapshot into the cursor reader's snapshot. Missing subtransaction state can leave catalog tuples invisible after the writer commits. Add an isolation2 case that scans the catalogs through cursors while a partition is created in a subtransaction, then checks visibility after commit.
Contributor
|
Hi! could you also give links to failing isolation2 tests? It's better to start with original issue to fully understand what's going on. |
Author
Hi! I haven’t found a public issue for this exact failure. The reproducer is the new sharedsnapshot isolation2 case. |
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.
What does this PR do?
RestoreSnapshot()restores the writer's subtransaction state, butreadSharedLocalSnapshot_forCursor()omits it when copying the snapshot into the reader. A cursor can then mark catalog tuples from a still-running subtransaction as HEAP_XMIN_INVALID`, leaving them invisible after commit.Copy
subxip,subxcnt, andsuboverflowedinto the reader's snapshot.Type of Change
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelBefore the fix, the new
sharedsnapshotisolation2 case failed. After commit, a fresh session could not see the new partition's entries inpg_classorpg_type, and querying the parent table failed.With the fix,
sharedsnapshotand all 10 related AO and AOCO cursor tests passed.sharedsnapshot_dsm_errorpassed before and after the fix.Checklist