Repository navigation
fix(#10304): the committed edge-list check reads a multi-page or placeholder vertex from the committed pages - #10313
Conversation
…eholder vertex from the committed pages Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ -4.99% coverage variation |
| Diff coverage | ✅ 58.21% diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (14ce29f) 241725 209417 86.63% Head commit (df2d8f6) 274489 (+32764) 224111 (+14694) 81.65% (-4.99%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#10313) 67 39 58.21% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
ReviewSolid, well-scoped fix. It closes the #10263 window for placeholder and multi-page vertices, reuses Suggestions
No security concerns. LGTM once item 1 is confirmed. |
|
OK to merge. Pre-verified the head
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10313 +/- ##
============================================
- Coverage 78.50% 78.48% -0.02%
Complexity 4707 4707
============================================
Files 2266 2266
Lines 241725 241788 +63
Branches 52403 52421 +18
============================================
+ Hits 189767 189774 +7
- Misses 32350 32395 +45
- Partials 19608 19619 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #10304
Summary
LocalBucket.getRecordFromCommittedPage(added by #10263, PR #10303) answered only a record stored in place from the committed page; a placeholder pointer or a multi-page record fell back togetRecordInternal, i.e. the transaction's own view. SoGraphEngine.committedEdgeListHoldsread a vertex that outgrew its page as the transaction held it, edge-list head pointers included, and the #10263 window stayed open for such vertices: a transaction that pinned the vertex's head page (anyREPEATABLE_READread, or a rewrite of the vertex) and then deleted an edge a concurrent commit had just added found no entry in either list and deleted the edge record under an entry that survived.Now every shape is answered from the committed pages:
FIRST_CHUNKhead): assembled through the page manager alone and validated against one commit, reusingassembleFromNewestCommitted(the REPEATABLE_READ now refuses the FIRST read of a multi-page record with ConcurrentModificationException when an unrelated record sharing one of its chunk pages was read earlier, so a plain SELECT fails #9620 helper). A chain no attempt can assemble whole raises a retryableConcurrentModificationExceptioninstead of answering "no record" (which the edge removal would act on); a record deleted meanwhile still answers null.PageManager.getPublicationSequence(), and again under the publication lock when one overlapped (the same pattern asvalidateChainReadAgainstOneCommit). Content in both shapes: negated-size plain content, or a chunk head (FIRST_CHUNK_PLACEHOLDER_CONTENTor legacyFIRST_CHUNK) assembled as above.The
Limit:note oncommittedEdgeListHoldsis replaced accordingly.Test plan
Issue10304CommittedRecordReadTest(new, 5 tests); 3 fail onmain(verified by reverse-applying the fix), all pass with it:aMultiPageRecordIsReadAsCommittedNotAsTheTransactionHoldsIt- REPEATABLE_READ pins the chain, a concurrent commit rewrites it, the committed read must equal what a fresh transaction reads (fails on main)aPlaceholderBackedRecordIsReadAsCommittedNotAsTheTransactionHoldsIt- same for a placeholder-backed record built withsealFirstPage(fails on main)aDeletedMultiPageRecordReadsAsNoRecord- deleted chain still answers nulldeletingAnEdgeOfAMultiPageVertexHeldWithoutAnyListIsAConflictUnderRepeatableRead- the Concurrent transactions that delete edges can leave an extra entry in a vertex's edge list: a deleted edge, another edge that took its RID, or a duplicate #10263 graph window on 200 KB vertices; asserts the CME comes from the committed edge-list check (message pinned) (fails on main: the delete went through)deletingAnEdgeOfAMultiPageVertexHeldWithoutAnyListIsAConflict(READ_COMMITTED) - guard; passes on main too, because under READ_COMMITTED the transaction's own read refreshes the chainIssue10263ConcurrentEdgeDeleteTest(9 tests incl. the twoslowstress tests) greenIssue6*,Issue9*,Issue10*,*Edge*,*Graph*,*Bucket*,*MultiPage*,*Chunk*(808 classes, 6120 tests, excludingbenchmark,vector): 0 failures, 0 errorsCoverage
Invariant:
getRecordFromCommittedPagenever answers from the calling transaction's view, whatever shape the record has.grep -rn getRecordFromCommittedPage engine server(main sources): one caller,GraphEngine.committedRecordContent, used for the vertex, the list head (chunk orStripeDirectory) and every chunk of the chain.committedEdgeListHoldscommittedEdgeListHoldscommittedEdgeListHoldsKnown gaps: None.
Adversarial pass
Not run: no subagent (Task) tool was available in this session. A self-review covered: lock reentrancy (
PageManagerextendsLockContext, aReentrantLock, so the nestedexecuteInLockinvalidateChainReadAgainstOneCommitis safe), a slot that changed shape between the caller's read and the placeholder re-read (served as the new shape), and a broken/in-motion chain (CME, retryable, never a silent "no record").🤖 Generated with Claude Code
Summary by CodeRabbit