Repository navigation
Conversation
Adapt matrixorigin#27928 to the 4.2 transaction detach path. Related to matrixorigin#27884.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: a15820bab01714bad98a65785a7497270066b4d5
Assessment: approve
The positive-only reference acquisition prevents retired slices from being resurrected, and the existing version check handles stale readers across replacement and reuse. Moving the completion log before detach preserves the slice owner through that read. No actionable defects remain.
Model: gpt-6.1-terra / max
Session: 01a210f5-236b-7a40-a956-fdee040ef313 · slot 3 · generation 2
Validation:
-
Preflight and git diff --check passed; receipts checks/1795591410879581998-2.json and checks/1795591410818751758-2.json.
-
The focused lockservice race run passed 23 selected tests, including the reported interleaving and retryable-close controls; log focused-race-retry.log and receipt checks/1795591922041313315-2.json.
-
Eight individual concurrency and close tests each passed 100 race-detector repetitions; logs race-Test*.log and corresponding receipts are retained.
-
The full lockservice package passed under the race detector with 496 top-level tests, no skips, and no race reports; log package-race.log and receipt checks/1795592176103956645-2.json.
-
The linked main-branch fix has identical slice.go, slice_test.go, and reuse.go; its accepted multi-CN smoke is relevant context for the core fix.
Limitations:
-
No separate 4.2 multi-CN lock-churn or restart smoke was run. The PR identifies that as pending release validation; the linked issue's accepted smoke used the main-branch fix.
-
An initial test attempt was interrupted during slow dependency downloads. The subsequent focused and package runs completed using the assigned cache and the official Go module proxy.
🚫 Left the queue · pull request dequeued25 min in the queue, with no time running CI. So far
Reason Pull request #33206 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
|
@Ariznawlll 请协助验收这次锁服务修复在 原故障发生在并发读写锁记录时:读者可能重新引用已经回收的对象,导致重复回收,计算节点随后可能崩溃。该回补已有针对引用计数和事务释放顺序的定向单测记录,最终 PR 的必需检查未通过,多节点发布场景仍待验证。 请在包含上述提交的 4.2 构建上,让至少两个计算节点的事务并发更新同一组记录,通过提交和回滚反复获取、释放锁。在负载持续期间逐个重启计算节点。请确认重启后新事务能再次获得同一组记录的锁并完成提交或回滚,已提交的数据可读、已回滚的更新不可见,且没有非预期的进程退出或持续卡死。 请在此回复通过或失败,并附实际测试提交、部署拓扑、重启顺序和事务终态。如果失败,请注明首次异常的节点、步骤及对应日志或运行链接。 |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #27884. Backports #27928 to
4.2-dev.What this PR does / why we need it:
A reader must not take a reference to a retired fixedSlice while its copy-on-write owner publishes a replacement. Initialize references at pool checkout, acquire reader references only while the count is positive, and complete transaction unlock logging before detaching the lock slice on the 4.2 close path.
Base
bb197e5118507d830f5e50f99a2676bb88a8d62f, heada15820bab01714bad98a65785a7497270066b4d5. Focused lockservice tests passed on Go 1.26.4/darwin-arm64, including deterministic reader/publication interleavings, pool ownership and debug logging during transaction detach.git diff --checkpassed.BVT: N/A for the deterministic regression. SQL cannot suspend the copy-on-write reader between pointer load and reference acquisition or inspect the pool's reference ownership. The lockservice tests drive those transitions and verify the final state directly.
QA required: yes. Cross-CN lock churn and rolling restart still need release validation.