Skip to content

Fix epoch race - #51

Merged
serprex merged 3 commits into
mainfrom
worktree-decode-pool-mapping-epoch
Jul 3, 2026
Merged

Fix epoch race#51
serprex merged 3 commits into
mainfrom
worktree-decode-pool-mapping-epoch

Conversation

@serprex

@serprex serprex commented Jul 3, 2026

Copy link
Copy Markdown
Member

Every MappingHandle write now bumps the shared invalidation epoch after its write guard drops, so decode-pool workers holding a pre-DDL mapping snapshot flush on their next refresh

Avoid caching stale descriptors under fresh epochs, rebump catalog invalidations at decoder position

@serprex

serprex commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

@serprex
serprex requested a review from harshil-goel July 3, 2026 03:56
@serprex serprex changed the title Worktree decode pool mapping epoch Fix epoch race Jul 3, 2026
Comment thread src/xact_buffer.rs
Comment thread src/xact_buffer.rs Outdated
serprex added 3 commits July 3, 2026 15:19
Every MappingHandle write now bumps the shared invalidation epoch after its write guard drops, so decode-pool workers holding a pre-DDL mapping snapshot flush on their next refresh
rebump catalog invalidations at decoder position
Replace global pg_class delete epoch with PendingSweeps keyed by WAL xids,
so interleaved commits cannot consume DROP signals before dropping transaction replays

Parse prepared xids and disarm aborted subxact arms
@serprex
serprex force-pushed the worktree-decode-pool-mapping-epoch branch from 94f9124 to b79c33f Compare July 3, 2026 16:41
@serprex
serprex merged commit 99fe46e into main Jul 3, 2026
5 checks passed
@serprex
serprex deleted the worktree-decode-pool-mapping-epoch branch July 3, 2026 17:00
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