Repository navigation
test(fileservice): isolate async ownership from disk sync latency - #29116
Conversation
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? |
22646f0 to
f2dd6da
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Force review of exact head f2dd6da.
未发现需要 REQUEST_CHANGES 的 material finding,本次提交 COMMENT。
已复查完整 diff,并追踪 async admission/cloning、path ownership、finalization、callback、Flush/Close、loader/restart 和资源清理链路。实例级 fileSync hook 只隔离测试中的真实 fsync latency,同时保留真实写入、发布和读取;两个 gate 都有即时且幂等的 cleanup,buffered result channel 在断言失败时不会阻塞。caller buffer mutation、callback 数据和实际 cache Read 共同验证了可观察语义,不只是内部 flag。
未引入全局 hook、skip、retry 或 timeout 放大;未发现新增 race、死锁、泄漏或重复释放路径。exact-head Ubuntu CI 已确认 pkg/fileservice 纳入 race 测试并成功完成。
边界:该测试证明 lifecycle ordering 和 cache readable data,不证明断电持久性,也未独立重跑作者报告的 normal/race x100/完整包测试;FD 数量、temp-file 清单和 callback budget 没有单独断言,但相关生产清理链已追踪。
What type of PR is this?
Which issue(s) this PR fixes:
Related to #28784 (disk-cache lifecycle/finalization UT flakiness).
What this PR does / why we need it:
TestDiskCacheAsyncUpdateReturnsBeforePathAvailablecorrectly observed asynchronous admission in the Ubuntu race job, but then exhausted its five-secondFlushcontext while finalizing a real disk write. The test was coupling an ordering/ownership contract to realfile.Synclatency. The CI artifacts do not establish which syscall consumed the deadline, so this is a test-contract correction, not a claim to have proved a filesystem or production cache defect.Flushdrains writes, not callbacks.Validation
Local platform: Darwin arm64, Go 1.26.4, matching freshly built native libraries,
matrixone_testtag.pkg/fileservicepackage: normal pass, 24.046s; 848 passing test/subtest events, 11 existing skips.go vet, golangci-lint 2.6.2 (0 issues), gofmt and diff checks pass.Scope and remaining risk
The same CI job also failed
TestIssue26640ClusterRestoreRebindsSubscriptionPrivilegesduringCREATE ACCOUNT, before restore assertions, following HAKeeper/Raft timeouts. This PR does not claim to fix that independent failure. The existing, separately authored #29113 addresses embedded-package contention; its scheduling changes are not duplicated here. The unchanged restore case passes local normal mode (22.51s) and race mode (41.53s); isolated execution cannot establish loaded Linux CI stability.GPT-6 medium design approved the correction; a separate GPT-6 medium overall review accepted the final diff with zero blockers after reconciling all validation evidence. CI will run after publication; no CI pass is claimed and this task does not wait for it.