Repository navigation
fix(tae): flush ready table-tail objects past busy peers - #30396
mergify[bot] merged 5 commits into
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? |
|
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: 72a75b760c78bb4186d4b369551123f22ed7a9ae
Assessment: request_changes
Reviewed the complete delta and its scheduling, transaction, delete-transfer and cleanup paths. The selection design preserves existing ownership and passes functional validation, but introduces avoidable logging and allocation amplification under contention.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
- P2
pkg/vm/engine/tae/db/checkpoint/flusher.go:759: A flush encounters many data objects whose PrepareCompact returns false. Replacing the break with continue now executes the existing INFO diagnostic for every busy object across all chunks.
Impact: Repeated attempts incur per-object formatting, allocations and log I/O on the flush-admission path, even when no task can progress. Aggregate deferred counts or bound diagnostic sampling before formatting object IDs, while preserving readiness scanning and ExpectedEOB.
Evidence: A production-selector probe with 400 busy objects emitted 400 records totaling 88,400 bytes versus one 221-byte record on the base. With logging disabled, median allocation rose from 28,138 B/18 allocations to 127,364 B/1,615 allocations. Removing only this diagnostic in an overlay retained full scanning and reduced allocation to 31,354 B/15 allocations. Retained bench-base.log, bench-head.log, bench-no-busy-log.log and info-{base,head}.log are reconciled in evidence-audit.json.
Validation:
-
Preflight and current-revision native provenance passed. Full checkpoint package passed normally and under -race.
-
Four exact tests passed separate adaptive race stress: selection 100 repetitions, chunk boundaries 100, deadlines 100, real-engine commit/rollback/restart 8.
-
Nine downstream flush, delete-transfer, error-handling and replay controls passed. Base-source overlay failed the new regression as expected; candidate passed.
-
Selector benchmarks measured one additional allocation for all-ready chunks and confirmed the logging regression. gofmt and git diff --check passed; source remains unchanged.
-
Commands, source fingerprints, exit receipts, selections and retained logs were reconciled in /home/xupeng/.local/state/mo-bot/jobs/4e170a4f734a2ba48b09c01a/attempt-1/evidence-audit.json; complete review map is in review-notes.md.
Limitations:
-
Performance probes use mocked readiness with the production selector, not end-to-end storage throughput.
-
The original scale workload and memory-pressure incident were not reproduced; this PR explicitly addresses only partial remediation.
-
Frozen evidence contains no linked issue body or retained author-validation inventory. Author execution claims were not treated as independently verified.
|
Addressed the P2 in 093b290. The concern is valid: continuing past busy objects amplified the existing diagnostic. The selector now counts deferred data objects and emits at most one Validation on 50 (Go1.27.1, provenance-checked CPU native artifacts):
Raw logs, overlays, fingerprints and delivery notes are retained in |
|
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: 093b290198750ab9fd260b7ebef8cda780dd2a2e
Assessment: approve
Reviewed the complete delta and affected scheduling, transaction, delete-transfer and cleanup paths. The fix preserves existing ownership, chunk boundaries and retry semantics while allowing ready peers to progress. The prior logging-amplification finding is resolved; no actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Current checkpoint package passed under -race, including real-engine commit/rollback and restart coverage. The logging regression passed 100 repetitions and failed against the previously reviewed implementation as expected.
-
Independently reconciled 19 retained receipts and logs covering source-compatible normal tests, focused race stress, downstream controls and the original negative control.
-
Verified 192 native inputs, 47 native artifacts and repository provenance. Isolation preflight, gofmt and diff checks passed; source remains unchanged.
-
Five-sample selector benchmarks confirmed busy-object allocations fell from 127365 B/1615 allocations at the previous head to 31483 B/16. All-ready overhead versus the merge base is 27962→31419 B and 15→16 allocations, supporting immutable task selections.
-
Commands, fingerprints, receipts and logs are reconciled in /home/xupeng/.local/state/mo-bot/jobs/31bad1e183f529e76a6e66d4/attempt-1/evidence-audit.json; complete review notes are in review-notes.json.
Limitations:
-
Benchmarks use the production selector with mocked readiness, not storage throughput. Scale-level batching, write amplification and the original memory-pressure incident remain outside this explicitly partial remediation.
-
Latest author /tmp artifacts were unavailable; current checks and verified retained artifacts supplied the required evidence.
-
The standalone linked issue body was not supplied; its contract was reviewed as recorded in the frozen PR description.
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 14 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 3 hours 56 minutes 41 seconds in the queue, including 1 hour 3 minutes 51 seconds running CI. Required conditions to merge
|
|
独立合并后实测(2026-10-17,本轮冻结 main
结论:#30396 修复的局部 flush 推进/重试缺陷已验证。#30244 的原始 129 / 100M rows / 1000 threads / 84 GiB 压力链,本轮没有在该规模重放;不把小型 engine 通过或既有 128 压测报告写成整个内存事件已解决,也不声称性能无回退。#30244 已在 @Ariznawlll 测试名下,保持 OPEN 及当前指派。 |
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30244 (partial remediation; do not automatically close the incident).
What this PR does / why we need it:
Related to #30244. This fixes the demonstrated normal-flush scheduling/progress
defect identified while investigating that incident; it does not establish
that the entire 84 GiB memory-pressure incident is resolved.
fireFlushTabletailpreviously stopped the whole loop when any data object'sPrepareCompactreturned false. It then returned nil, allowing the caller toreset the table's flush deadline despite deferring work. A single busy object
could prevent ready peers in the same chunk and later chunks from progressing.
original chunk boundaries and immutable per-task selection slices.
scheduling, so the caller does not postpone retries by resetting the deadline.
fallback when every data object is busy.
Safety boundary
No changes to
PrepareCompact, appender reference ownership, freeze/MVCC checks,flush-task retry, delete transfer, persistence format, scheduler scope exclusion,
GC/cache settings or memory admission. The existing flush task already supports
partial data sets with the full tombstone set for tables larger than 400 objects.
As before, a successful scheduling return is not a completed flush transaction.
Validation
Local Linux/amd64, Go1.27.1, CGo CPU build produced via repository
make cgo;tests use the repository provenance-checking
mo-cgo-testwrapper:the candidate passes it (no copied-model-only proof).
-race.-race -count=100, run separately.on both clean baseline and candidate.
appender reference, checks exact physical source identity, PK and payload values,
persisted deletes, writer commit/rollback, retry, and restart.
gofmt,git diff --checkand defaultgo testvet pass.with task-local
golangci-lint v2.14.0built with Go1.27.1: 0 issues.The local validation manifest retains source/native hashes, exact commands,
terminal JSON test records, and negative controls. Independent downstream/hunk
review found no remaining correctness blocker in this scoped patch.
No remote TKE/129 scale workload has been dispatched for this patch. Replaying
the original 1000-thread Sysbench sequence and measuring memory/admission errors
remains a separate acceptance step, at the user's chosen environment.
That replay should also compare flush task/object counts, bytes written and
throughput: allowing ready subsets to progress can change batching under
continuous contention. This patch does not claim scale-level performance
neutrality from local functional tests.