-
Notifications
You must be signed in to change notification settings - Fork 0
fix(meta): name the branch partition on every metadata statement #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nhobin219
merged 23 commits into
main
from
nhobin219/cha-546-partitioned-table-reads-and-writes-must-target-the-partition
Jul 31, 2026
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
34752cf
docs(agent): note roborev show --json exits non-zero pre-review
a04f126
test(lifecycle): guard partition-direct metadata table naming
9b33e9b
test(lifecycle): branch ops must not lock a metadata parent
2ddfbe7
test(lifecycle): pin the refcount gate's exact parent set
c8acd62
fix(lifecycle): name the branch partition in persist metadata statements
76eb937
test(lifecycle): lock ONLY the metadata parents in the CHA-546 fixture
e4b8e07
fix(lifecycle): name the branch partition in snapshot statements
ef1766d
fix(lifecycle): name the branch partition in segment index statements
bcfd824
fix(lifecycle): name both partitions in the fork cold-reference copy
6fde7c8
fix(lifecycle): name the branch partition in purge and compact SQL
40a54ff
fix(query): name the branch partition in read-plan metadata SQL
df34b9a
docs(lifecycle): retire the CHA-546 TODOs on teardown lock contention
1c7ac25
docs(lifecycle): pin the refcount predicate's parent-table contract
a52a29d
test(meta): name the metadata leaf in pg_stat_statements needles
ce78b28
test(db): measure CHA-546's real parent-lock footprint
ce43490
docs: correct the parent-lock claims measurement falsified
ff81a46
docs(lifecycle): retire's tx holds no metadata parent lock at all
4c4515c
docs(db): correct the static test's parent-lock rationale
6aa219d
docs(lifecycle): state teardown's real reason for the pre-tx table read
0c3ad97
docs(query): reattach the fallible-parse comment to its call
a35215a
docs(db): correct the lock-footprint fixture's module-scope rationale
f1d95f9
docs(lifecycle): drop the wrong lock_timeout claim from the tx note
8df7af7
refactor(meta): bind the already-parsed branch uuid instead of reparsing
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important: The paragraph immediately below this hunk (lines 1108-1117, starting
// It cannot move inside.) is falsified by this PR and was not updated - even though every sibling paragraph in this same function was rewritten (this hunk at 1086-1106, and the delete-set ordering comment at 1248-1260).It currently claims:
Post-CHA-546 that plan path names leaves, not parents:
list_table_uuids_for_branch(crates/penca-api/src/query/meta_resolve.rs:872) ->resolve_table_metadata-> themeta_plan.rsreads this PR converted. So planning inside the transaction no longer takesACCESS SHAREon any parent, and the cross-branchACCESS SHARE->ACCESS EXCLUSIVEupgrade cycle it describes can no longer form. The closing clause - "Partition-scoping the enumerations bought exactly that property; planning inside the lock gives it back" - is falsified for the same reason.The conclusion still holds, but on different grounds worth stating explicitly:
list_table_uuids_for_branchis a cold-capable read that can block on object storage, so moving it inside would stretch a transaction that holdsEXCLUSIVEon this branch's leaves under a 5slock_timeout.This is worth fixing in this PR specifically because the PR's own guard cannot catch it:
tests/static/static_cha546_partition_naming_test.py::test_no_open_cha546_todosgreps only for theTODO(CHA-546)marker (correctly removed from this block), while that test's own comment names "the comments in pg.rs::lock_branch_teardown_partitions and write/mod.rs" as exactly the prose that "describe[s] something that no longer happens." One of the two named sites still does.(Anchored here because 1108-1117 fall just outside the diff hunk.)