Repository navigation
tae: flush eligible AObject prefixes before busy tails - #31723
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? |
sysbench1000w memory comparison on 129 Slot B
Peak values below use the 30-second samples inside each five-minute case window (GiB):
The tracked off-heap file-service memory cache peak was 30.09 → 30.13 GiB for The fix run's complete memory time series, case logs, and heap/malloc profiles are preserved on 129 at |
|
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: 427da30f63cab783788ddc70f2dc709df7b29cd2
Assessment: approve
Reviewed the complete delta, affected storage and scheduling paths, and all discussion. Prefix admission preserves readiness checks, delete transfer, rollback and retry behavior. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
Validation:
-
Reused supplied current-head successful UT, coverage, build, SCA, proxy BVT and pessimistic multi-CN BVT statuses.
-
Static audit passed; retained log static-audit-v2.log matches receipt checks/1793330585304360024-3.json. Verified frozen delta, clean source, whitespace and complete discussion coverage.
-
Saved review-plan.md and discussion-assessment.json.
Limitations:
-
No local Go tests were run; raw CI per-test logs and execution flags were unavailable.
-
Older uncontrolled memory measurements were treated as context, not verified current-head performance evidence.
🚫 Left the queue1 h 3 min in the queue, with no time running CI. So far
Reason Pull request #31723 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.
Hint You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Merge conditions: 2 of 3 metThis pull request
The batch, tested in place
Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #31350 (the Sysbench memory-pressure follow-up in that issue; this PR does not fix or validate the original oversized-WAL/DN-panic incident).
What this PR does / why we need it:
This PR addresses memory pressure caused by flushable appendable objects accumulating behind an object that temporarily fails
PrepareCompact. The flusher can now admit the contiguous oldest-to-newest ready prefix instead of letting the busy object block that prefix. Data and tombstone objects have independent prefixes. For a partial flush, it applies the existing memory/pressure/deadline policy to the ready prefix and keeps the retry deadline for the deferred suffix.This lets eligible objects be flushed and cleaned up earlier. Reducing TN flush backlog can indirectly reduce the lifetime and amount of CN logtail row state retained for unflushed objects; this PR does not change CN logtail replay itself and does not claim to eliminate every source of CN memory growth. Focused tests cover prefix order, memory and pressure thresholds, busy tombstones, retry behavior, and chunk boundaries.
Memory evidence and limits
The Sysbench 1000W runs used the 129 shared runner. The baseline used
matrixorigin/matrixone@7597f979e7904cf37ff077c94ffad191367d4d89; the candidate used this change at65c0f20aa8e2de73c9b9abb4703f4c34481af693. The 30-second samples inside each five-minute case show peak Goheap_allocof 33.75 -> 16.37 GiB and process RSS of 67.89 -> 50.31 GiB forupdate_index; forupdate_non_index, the corresponding peaks are 30.50 -> 12.71 GiB and 69.08 -> 49.26 GiB. The baseline samples are in its workflow artifact; the candidate's complete time series and 73 heap plus 73 malloc profiles are preserved on 129 at/data3/mo-benchmark-preserved/gh-40838393893-1-sysbench1000w/. See the measurement comment for cgroup and tracked off-heap cache values. These are one observed run per commit under different concurrent host load, not a controlled A/B or proof that the patch alone caused the reduction. The current PR headcf34087d858060c521845275c524cd62ed60e13aincludes a later main merge and the lazy-prefix-allocation follow-up; it was not the commit measured by Sysbench.update_indexpassed; the workflow was later cancelled.update_indexandupdate_non_indexpassed; the workflow succeeded.Validation
flusher.goand its focused test file.gofmtandgit diff --checkpassed on the original change.cf34087d858060c521845275c524cd62ed60e13a, the focused checkpoint tests passed locally:.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=180s -run '^Test(FireFlushTabletail|FlushDeadline|FlushPartialPrefix|FlushBusyTombstone|PartialFlushPreservesDeletesAndWriter)' ./pkg/vm/engine/tae/db/checkpoint. The isolated worktree's CGo build used ONNX Runtime extracted from the previous-head CI build artifact, with SHA256 matching the repository-pinned Linux amd64 checksum.gofmtandgit diff --checkalso passed. The previous head482e41904aebd016397890c1f37d1908b9e0cb9apassed CI UT Coverage; CI for the current head is pending. The Sysbench workload at65c0f20does not replace tests at the current head.