Repository navigation
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? |
|
Addressed XuPeng-SH's two blocking findings on exact head
Validation: focused and full CGo package tests pass; each new regression passed BVT remains N/A because these are package-internal allocator/cache/embed lifecycle contracts. |
|
CI triage for exact head
The exact No source change or rerun was made. The required CI state remains unresolved. Next action is an isolated exact-head/base BVT reproduction or actionable Compose failure output, plus a clean exact-head Ubuntu/x86 UT result. |
|
Reran only the confirmed self-hosted-runner failure for exact head |
|
CI update for the exact head
No source change or further rerun was made. Required CI remains unresolved. The next safe action is a clean current-head UT result plus an exact-head/base Compose reproduction once the fixed-port environment is available; the PR also remains pending XuPeng-SH review confirmation. |
|
CI update for exact head
Next action: obtain a clean Ubuntu/x86 UT execution on this exact head, then await XuPeng-SH's re-review. |
|
Addressed both blocking findings from XuPeng-SH's review on exact head
Validation on this exact head: focused Please re-review this exact head. |
|
CI update for exact head
|
|
CI diagnosis for exact head
No source or branch change was made from this cluster. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep incremental re-review completed at exact head 9b0591e against exact 4.1-dev base 0d5195e. I reused the prior full review for the patch-identical allocator, cache, and MORPC stack and reviewed every hunk in the two commits after my previous CHANGES_REQUESTED review, plus the affected consumers and lifecycle terminal paths.
Both previous blockers are closed. ObjectIO now carries the final cached representation size from every extent-read entry point, so compressed remote-cache hits are validated against OriginSize rather than compressed extent length, with focused FileService and ObjectIO coverage. Failed initial embedded startup now retains the service together with its stopper and FileService dependencies, records incomplete cleanup, rejects replacement startup while cleanup remains incomplete, and retries cleanup before admitting the next generation.
The latest commit also fixes the shared embedded-test cluster error contract: initialization state stores the first startup error alongside sync.Once, every test and benchmark call supplies a reporter, and subsequent callers fail with the original error rather than continuing with a nil cluster. All repository callers were updated; this is test-only and adds no production hot-path cost.
Q1: service and dependency ownership remains with one operator until successful cleanup, and cluster pending cleanup is de-duplicated and retried. Q2: no new wait edge is introduced; cleanup and restart remain serialized by the cluster/operator locks. Q3: pending cleanup is bounded by configured service count and is drained before restart; the once-cluster state is constant-size. No new correctness, compatibility, liveness, leak, OOM, logging, or material performance blocker was found.
Evidence reused on this exact head: Ubuntu/x86 UT, shared build, arm64 SCA, coverage, compose PROXY BVT, and pessimistic multi-CN BVT all completed successfully. The isolated macOS review worktree lacks its own cgo/libmo.dylib, so I did not misclassify that local prerequisite as product evidence.
iamlinjunhong
left a comment
There was a problem hiding this comment.
Reviewed the complete 4.1-dev..9b0591e diff, affected call chains, lifecycle ownership, and tests. I found two blocking P1 issues in the new startup rollback/retry path; details are inline. No P0 issue was found. Because the P1 issues remain at the current head, this review requests changes.
|
Addressed both current-head P1 findings from iamlinjunhong in commit d506236.
Validation in the target worktree CGo environment:
BVT: N/A — this is package-internal embedded lifecycle/error-path behavior with no SQL/DDL boundary; the existing PR BVT exception remains applicable. |
|
The exact-head UT failure on The failed job was rerun once under the existing rerun budget after confirming the current |
|
CI diagnosis for exact head |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep incremental re-review completed at exact head d506236e15f8adf341fd4091e5375b02da9707d6 against exact 4.1-dev base 0d5195e5f93292939e2c5bca66a9746993315d25.
I reused my complete review and approval at 9b0591e: the allocator, cache, remote-cache, ObjectIO, MORPC, metrics, native build, and earlier embedded rollback closures are unchanged. The only newer commit is the three-file startup/client-lifecycle fix, and I reviewed every new hunk plus all affected construction, normal Close, failed-start rollback, cleanup retry, and replacement-generation paths.
Both newer P1 findings are closed. Concurrent CN startup now captures the first heterogeneous error through sync.Once, so it cannot panic on atomic.Value concrete-type mismatch. Query clients and the temporary HAKeeper client are transferred into the operator reset owner immediately after construction, retained on failed cleanup, closed only after dependent service/FileService resources, and included in needsCleanup/restart admission. Partial construction, wait failure, normal Close, initial-start rollback, dynamic cleanup retry, repeated Close, and next-generation startup all preserve bounded ownership.
Unhappy-path audit: Q1 passes because every created client remains reachable from exactly one cleanup generation until successful idempotent Close; Q2 passes because the new synchronization is startup-only, all CN goroutines join through the existing WaitGroup, and cleanup remains serialized by the existing cluster/operator locks; Q3 passes because retained cleanup state is bounded by configured services and FileServices and is drained before restart. The delta adds no steady-state request-path work, lock, allocation, or logging, so it has no material hot-path performance or log-storm risk.
Exact-head evidence: rebuilt the pinned thirdparty and CGo artifacts on macOS/arm64; seven focused startup/cleanup regressions passed under -race -count=50; the complete pkg/embed suite passed in 113.639s. Required current-head CI is green: Ubuntu/x86 UT, arm64 SCA, shared build/coverage, PROXY compose BVT, and pessimistic multi-CN BVT. git diff --check passes and the review worktree is clean.
No blocking finding remains; approving this head. As the PR body states, rerunning the #26992 workload is still a QA/merge-acceptance gate; this code approval does not by itself claim that the production workload has been revalidated.
What type of PR is this?
Which issue(s) this PR fixes:
Related issues: #26992, #27567
What this PR does / why we need it:
This PR backports the memory-cache backing-capacity accounting and the dedicated jemalloc allocator to
4.1-dev.The change is based on upstream PR #26997 (allocator replacement) and #26783 (backing-capacity accounting), adapted to the exact
4.1-devbase0d5195e5f93292939e2c5bca66a9746993315d25. It adds:The backport preserves the 4.1 FileService/objectio surface and does not import unrelated main-only DISK-V2, ONNX, CopyObject, or validation-pipeline changes. No SQL syntax, wire protocol, storage format, or default public configuration is changed.
This update also closes the startup and remote-cache safety gaps identified during review:
CachedDatarepresentation size separately from the compressed extent size;This update also repairs the exact 4.1 CI failures without changing allocator behavior:
oneWaybeforemessageSent, which may drop the final reference and return a synchronousFutureto the pool; deterministic tests cover bothcleanSendand unwritten write-failure paths and preserve one-way cleanup;Validation
GOWORK=off go list -mod=readonlyfor all changed Go packages: PASS.GOWORK=off go build -mod=readonlyandgo vet -mod=readonlyfor all changed production packages: PASS.-race -count=100; full owning-package race runs forpkg/common/malloc,pkg/embed,pkg/fileservice, andpkg/objectio: PASS.-race -count=50, and the fullpkg/common/morpcrace run passes.TestCannotHungWithUnstableNetwork: normal PASS,-race -count=10PASS, and the fullpkg/lockservicerace run passes.TestBackupProtectionCheckpointProtectionandTestBackupProtectionCheckpointFiltering: normal PASS, each-race -count=5PASS, and the fullpkg/backuprace run passes.d506236e15f8adf341fd4091e5375b02da9707d6:PASS semantic=PASSwith complete reviewed-content SHA-256058dc6ccf37194fc89a65ffff1a0059d5b3f10a34225979f93906191c0118045.3826bc80232f22ed5c4662f3034f799ca316e819103bdc7bb99018a421706f92; local static build: PASS.QA required: yes. The backport changes allocator/cache ownership and embedded startup cleanup. QA should validate the target
4.1-devdeployment and the #26992 workload before merge acceptance; this PR does not claim that workload has been rerun.