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? |
Benchmark validationRun 35859101708 tested PR head Result
InterpretationThe PR improves OOM safety, but The current result supports keeping cgroup-aware hard-pressure protection, but suggests separating or tuning the cgroup-based safety backstop from normal admission so reclaimable cgroup cache is not treated as full non-reclaimable RSS. The current run only covers the same 10W/100W TPCC set as the baseline; the 500W/1000W stages still need validation after any adjustment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Findings\n\n1. [P1] Account for cumulative reservations against the sampled cgroup headroom — \n\n The cgroup cap is compared with each request's , but is not reduced by reservations granted since the cgroup usage sample. For example, with total=100 MiB, sampled usage=95 MiB, RSS=70 MiB, and zero reservations, two successive 4 MiB requests can each pass the unchanged 5 MiB cgroup headroom check. The normal refresh is rate-limited, so both can be granted before another sample and exceed the remaining headroom. The generic/data-branch path has the same issue because clamps to the same sampled headroom without accounting for reservation growth against that sample. Please make the cgroup budget account atomically for cumulative growth since the sample, and cover sequential and concurrent acquisitions.\n\n2. **[P2] Apply the cgroup guard to projected additional S3 growth, not raw ** — \n\n This rejects an S3 reservation whenever , even if the requested memory is already represented by resident/reusable S3 pages covered by / . For example, at total=100 MiB and cgroup/RSS usage=95 MiB, a 6 MiB request is rejected against 5 MiB headroom even when the existing coverage means it adds no projected physical usage. That can surface as a spurious “CN S3 write memory is exhausted” on reuse/retry. Please base this guard on projected incremental physical growth while preserving the existing reuse accounting, and add a regression case with nonzero cgroup usage.\n\nThe exact-head CI is green, but current tests exercise only single-request headroom rejection and do not cover these cases.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Correction to my previous review: shell quoting stripped the inline code identifiers from its body. Please use the complete findings below; these supersede the malformed formatting above.
Findings
-
[P1] Account for cumulative reservations against the sampled cgroup headroom —
pkg/common/rscthrottler/resource_throttler.go:300-317,850-854The cgroup cap is compared with each request's
ask, but is not reduced by reservations granted since the cgroup usage sample. For example, with total=100 MiB, sampled usage=95 MiB, RSS=70 MiB, and zero reservations, two successive 4 MiB requests can each pass the unchanged 5 MiB cgroup headroom check. The normal refresh is rate-limited, so both can be granted before another sample and exceed the remaining headroom. The generic/data-branch path has the same issue becausecapAdmissionAvailableclamps to the same sampled headroom without accounting for reservation growth against that sample. Please make the cgroup budget account atomically for cumulative growth since the sample, and cover sequential and concurrent acquisitions. -
[P2] Apply the cgroup guard to projected additional S3 growth, not raw
ask—pkg/common/rscthrottler/resource_throttler.go:850-854This rejects an S3 reservation whenever
ask > headroom, even if the requested memory is already represented by resident/reusable S3 pages covered byrssReservedBase/rssMpoolLiveBase. For example, at total=100 MiB and cgroup/RSS usage=95 MiB, a 6 MiB request is rejected against 5 MiB headroom even when the existing coverage means it adds no projected physical usage. That can surface as a spurious “CN S3 write memory is exhausted” on reuse/retry. Please base this guard on projected incremental physical growth while preserving the existing reuse accounting, and add a regression case with nonzero cgroup usage.
The exact-head CI is green, but current tests exercise only single-request headroom rejection and do not cover these cases.
CI 失败诊断:共享物理内存准入导致 SQL/认证饥饿分析对象为 exact head 1. 两个 job 的最终结果
服务日志与报告可从本轮 PROXY artifact 和 PESSIMISTIC artifact 下载。 2. 已确认的主要失败链路大面积失败不是普通 golden 差异,而是新增的共享物理内存门禁拒绝 SQL,进一步扩散到后台任务和登录认证: 关键日志时间均为 UTC:
因此,“没有有效连接”不代表 CN 已经崩溃。下载的服务日志中未发现 panic/fatal/OOM-kill 证据;CN 在认证失败期间仍运行,直到 CI 清理阶段才记录 TERM 触发的正常关闭(PROXY 约 3. 为什么该 PR 会触发这些失败A. 新门禁改变了原有语义,而不只是增加 cgroup 用量统计。 base 的 默认 这里 B. 本轮落在 host 内存域,新共享账本没有抵扣可回收缓存。 两个 job 均记录 宿主机采样 保存 它没有使用 Reclaimable。对于本轮没有 soft limit 的 host domain,等价于: 原来的执行 headroom 路径仍可以把可回收缓存计为可用,但随后增加的共享账本会独立拒绝它。因此,即使前一道检查允许,新增检查仍能拒绝;两者口径不一致。 按日志中的保护区估算,常规入口要求约为 C. 内部控制操作也受同一门禁限制,缺少有界进展保障。 生产进程只要具备 FileService,就会 接入共享账本。当前入口没有区分普通数据查询和认证/任务心跳等控制操作。日志已直接证明这两类内部 SQL 会被一起拒绝。
此外, 4. 独立保留的 wrong-result 问题PROXY 还有两处真实少行:
对应索引回填 SQL 日志均报告 5. 修复方向与验证缺口
当前单测不能代替这些验证:代码明确让无 FileService 的裸进程夹具不接入生产共享账本,因而很多隔离单测不会经过新增入口门禁。 证据边界: 新入口直接造成 SQL 和认证拒绝已确认;host cache-sensitive accounting 与统一入口 floor 的机制也已由差异确认。但 artifacts 没有事故时完整 |
|
Re-reviewed unchanged head Recommendation: request changes. This supersedes the "no new blocking code findings; CI pending" assessment in my previous comment. The code has not changed, but the completed integration evidence exposes an availability regression that the earlier owning-package tests did not cover. [P1] Prevent the new physical entry gate from starving SQL and authenticationAt execution_resource_budget.go:1179–1184, every generation whose cap exceeds the default 256 MiB entry floor must pass the shared ledger's check. This also applies to authentication and background SQL; the requested 256 MiB is an entry threshold, not the statement's actual allocation. The shared ledger subtracts raw Independent exact-head witness, using the actual
The cached-host expectation fails in all three The production impact is independently present in the raw CI evidence:
Please reconcile host admission with reclaimable-memory availability while retaining finite-cgroup protection and cumulative pending claims. Rework the fixed entry floor so authentication, heartbeats and necessary cleanup have bounded, charged progress under pressure; do not simply exempt all internal SQL. Add production-path tests with FileService/shared-ledger participation, including low-free/high-reclaimable host memory and true exhaustion, then validate both multi-CN BVT configurations. Other evidence and limits
|
Separate clean-cache working-set reserve from raw hard/soft charged limits, retain bounded runtime credit for control work, and tag only bootstrap readiness probes. Give pure operator fixtures lazy finite private budgets while retaining live-domain coverage. Cover the failing CI memory sample, allocation ownership, soft-limit exhaustion, and fixture cleanup; fix the control test preallocation lint.
Keep the one-second blocked-work watchdog without charging CI scheduling, race instrumentation, or logging delay. Both mock-only work and peer cursor tests pass 20 repeated race runs.
|
Re-reviewed exact head Recommendation: request changes — one newly identified P2 remains. The previous cached-host/fixed-entry-floor counterexample is closed in the tested paths; the finding below is a different recovery failure in the PR's shared ledger, not an assertion that the latest four commits introduced it. [P2] Let ordinary admission recover after a transient non-Go memory peakAt memory_admission.go:204–209, Independent exact-head witness, using the default policy values and the actual FileService-backed
The high-peak cases fail for host, cgroup v1 and cgroup v2 in all three The new bounded control allowance does not restore ordinary SQL/write-path admission. Please bound or safely recalibrate the historical reserve so recovered domains can resume ordinary work, while retaining the raw charged hard/soft boundary and cumulative outstanding claims. Add a pressure → recovery regression through the production allocation path; do not fix this by discarding live reservations or exempting ordinary queries from accounting. Previous finding and validationThe previous P1's fixed 256 MiB entry check is removed. Host cache credit is aligned between the shared ledger and component backstops. The new control leases have bounded concurrency/bytes and retain their charge and slot until physical frees complete. These corrections pass the tested boundaries; this is not yet a claim that the prior full multi-CN incidents are resolved. Exact-head validation in an isolated macOS/arm64 worktree:
At the latest check, Connector/J passed; Shared Build, Ubuntu UT, arm64 SCA and UT Coverage were still running. Do not carry the old head's failures forward as results for this head. The earlier MATCH wrong-result evidence remains an independent validation item, and the PR body's agreed current-revision performance acceptance is still open. No benchmark, CI rerun or code push was performed. This is an ordinary comment, not a formal GitHub review event. |
Route public memory readers, component sizing and remote execution through the shared domain. Preserve independent hierarchy capacity/cache bounds while retaining paired usage and admission limits; use host accounting when a cgroup quota is not binding. Install the shared physical ledger by default and keep component/query quotas as child ceilings instead of retaining independent RSS admission vetoes. Add cancellable, bounded FIFO statement entry before transaction side effects, with pressure-only concurrency control and no fixed byte precharge. Reuse live context admissions for nested SQL and retain one bounded control lease across nested generations. Cover hierarchy sizing, FIFO/cancel/timeout/queue bounds, physical ownership, nested control lifetime, and real protocol multi-statement/prepared/transaction/error cleanup paths. Current-revision TPCC performance acceptance remains separate.
|
Re-reviewed exact head Recommendation: request changes — two new P2 findings, and the previous P2 remains reproducible. [P2, new] Keep query cancellation usable when pressure admission is saturatedAt memory_statement_admission.go:32–38, only COMMIT/ROLLBACK are classified as control statements. I reproduced this through real authenticated MySQL connections to an embedded single-CN cluster, not just by directly calling the queue:
All three repetitions fail only the expectation that cancellation should remain available under pressure; all three healthy controls and worker-interruption checks pass. This is a controlled admission-pressure reproduction, not a live OOM experiment. It does not rely on a full queue: one occupied configured pressure slot is sufficient. Please route authorized cancellation through an appropriately bounded control/cancellation path, retain authorization and physical accounting, and add a client-protocol regression with saturated pressure concurrency. This should not become an unrestricted internal-SQL exemption. [P2, still open] Ordinary admission remains poisoned by a transient non-Go peakThe previous finding is unchanged at memory_admission.go:216–222: I reran the unchanged production-allocation-path counterexample on this head: a 16 GiB domain first observes NonGo=8 GiB, then recovers to Used=1 GiB/NonGo=64 MiB with ten additional healthy observations and no outstanding claims. Reserve remains 16.25 GiB, Available=0, and a FileService-backed process's 4 KiB accounted allocation fails. A fresh ledger with the same current sample, and the retained-ledger smaller-peak control, both succeed. Host/cgroup-v1/cgroup-v2 high-peak cases fail in all three Please safely bound/recalibrate the historical reserve so recovered domains can resume ordinary work, without dropping live claims or weakening hard/soft physical boundaries. [P2, new] New error constructors fail the repository's required static-check entry pointThe new errors.New calls and fmt.Errorf wrapper violate the repository's existing Both Validation and limitsExact-head validation in an isolated macOS/arm64 worktree:
At the latest check, Connector/J and Iceberg checks passed; Shared Build, Ubuntu UT, arm64 SCA and UT Coverage were still running. Prior-head BVT/MATCH failures are not asserted as current-head results. The already-agreed current-revision performance acceptance remains open; these local tests do not replace full Linux multi-CN validation or that acceptance. No benchmark, CI rerun or code push was performed. This is an ordinary comment, not a formal GitHub review event. |
|
Follow-up review of unchanged head Recommendation remains request changes. I rechecked the relevant source and reran each of the three outstanding P2 witnesses in this review; these are confirmations of the existing findings, not three additional findings:
CI update: Shared Build has now passed, alongside Connector/J and Iceberg checks. In run 39014641388, Ubuntu UT, arm64 SCA, UT Coverage, PROXY BVT and PESSIMISTIC BVT are still in progress at this check. The local No product edits, code pushes, benchmark runs or CI reruns were performed. This is an ordinary comment, not a formal GitHub review event. |
|
Addressed the three P2 findings from the latest re-review in commit
Validation of this revision:
These are deterministic admission-pressure and SQL lifecycle checks, not live OOM/TPCC experiments. The already-agreed matched current-revision base/candidate and accounting-only/reclamation performance acceptance remains open; this does not claim to close #29270's original memory-growth root cause. No 129 benchmark workflow was dispatched. |
|
Re-reviewed exact head Assessment: the three P2 findings from my previous review are resolved in the tested paths. I found no new blocking code issue in this revision. This is not yet merge approval: current-head CI and the already-agreed performance acceptance remain pending. Previous findings
Validation performed for this review
CI evidence that still needs current-head closureI also inspected two completed failures from the previous head's CI. These belong to
The new head's CI run 39017009767 is still running. Please use its completed UT/Coverage/SCA and multi-CN BVT results to close the integration gap; do not carry the old failures forward as current-head findings or treat healthy-host tests as full incident resolution. The PR's existing matched current-revision memory/throughput/tail-latency acceptance remains open. No product code was edited or pushed, and no CI rerun or benchmark was launched. This is an ordinary comment, not a formal GitHub approval/review event. |
Run 39017009767:UT / UT Coverage 失败分析与修改建议分析提交: 已下载两个 job 的完整日志,以及 1. 已确认的失败普通 UT job 有三个失败测试:
UT Coverage job 的关键首发错误发生于 同一时段的快照为:
当前 这里的 cgroup usage 是共享内存域的总计数,不能等同于该 CN 的 RSS。现有日志不足以确定其他进程、文件缓存和内核内存各占多少,也不能据此判定 CN 内存泄漏。 共享测试夹具随后缓存了初始化错误,多个测试以 ArrowLoad 和升级测试另有 CN bootstrap 超时,当前证据不足以将这两个超时完全归因于 admission,需要保留单独排查。 2. 建议优先修改:拒绝诊断与确定性压力测试
先确定拒绝原因,再决定是否修改生产 admission 行为。真实物理内存耗尽时不能无界放行 control SQL。 3. 建议验证并约束 CI 重型测试的共享 cgroup 竞争
不建议通过降低 runtime reserve、给内部 SQL 无条件放行,或全局延长 250 ms statement admission 超时来消除这些失败。 4. 分离全文索引结构分配与系统内存采样开销代码调用链为: PR 将 建议容量查询优先读取已发布的缓存,由统一采样机制刷新;admission 仍须保持 usage/limit 成对快照,不能重新拆开读取。结构性分配测试注入固定容量来源,另行测试采样刷新成本,并在 Linux CI 参数下对照验证。 不建议直接把分配次数上限从 8 放宽到 121。 推荐顺序:先补拒绝快照和确定性测试,同时执行重型包串行对照;有归因证据后再调整 admission 行为和容量查询热路径。 |
… state Scope deterministic SQL pressure to a test CN instead of exhausting the process-wide real-domain ledger. Keep CN sizing and execution on the same physical owner. Preserve the failed admission snapshot and reason without allocating diagnostics on healthy requests. Isolate score-traversal allocation measurements from capacity sampling while retaining production live quotas and the original allocation bound.
|
Re-reviewed head No new blocking code finding in this delta. This is not merge approval; exact-head integration and the existing performance/memory-source acceptance remain open. What I checked:
Validation on this exact head, macOS/arm64,
At the final check, the head was unchanged: ALL CI run 39024341564 still had Ubuntu UT, Coverage, arm64 SCA and multi-CN BVT jobs in progress; Connector/J Pool Reset E2E had passed. These are not completed-green integration results. The previous run's CDC/startup zero-budget failures under shared cgroup pressure are not closed by these local successes. This delta improves attribution and isolates two test premises; it does not demonstrate that the other integration failures are fixed. Use completed checks on this head rather than relabeling failures from The PR's stated current-revision matched base/candidate TPCC acceptance also remains necessary: controlled memory, throughput/tail latency and pressure-time memory attribution together. Neither fixture isolation nor fewer OOM/pauses establishes that acceptance. No product code was edited or pushed, and no CI rerun or benchmark was launched. This is an ordinary comment, not a formal approval/request-changes event. |
Cover post-password system-variable initialization and tenant catch-up without persisting control classification on the session. Add real-protocol pressure regressions for fresh dump/root connections, wrong-password rejection, ordinary-query throttling, and KILL. The new fresh-connection tests fail on the previous head with control=false and pass after the fix.
Do not infer that eight or more CPUs can fit four race-instrumented embedded clusters in a 14-16 GiB domain. Preserve explicit three/four-worker opt-ins and serial rollback, with scheduler contract coverage for both defaults and overrides.
|
Re-reviewed exact head No new blocking code finding in this delta. This is not merge approval: completed exact-head integration and the PR's stated performance/memory-source acceptance are still needed. Handshake fix verified with a before/after controlThe local control marker in I copied the new cold-connection regression into the previous-head worktree under review-only test names. On Scheduling change is scoped to ordinary UT, not CoverageThe two-worker defaults preserve the eight issues batches/four audited embedded batches and explicit larger-pool overrides. The complete However, the current run resolves For attribution, the previous head's UT failure includes CDC setup being rejected by statement admission. Its Coverage failure includes Exact-head local validationmacOS/arm64,
At the final check, the head is unchanged. Current CI run 39032010323 still has UT, Coverage and arm64 SCA in progress; the shared build, Connector/J Pool Reset E2E and native checks have passed. This is not a completed-green integration run. The already-agreed matched current-revision base/candidate memory, throughput/tail-latency and pressure-time attribution acceptance remains open; reducing test concurrency is not performance evidence. No product code was edited or pushed, and no CI rerun or benchmark was launched. This is an ordinary comment, not a formal GitHub review event. |
Remediation plan for the four design defects (head
|
| Fix | Defect | Location | Size | Priority |
|---|---|---|---|---|
| F1 Split pressure vs hard views | D1: tripwire mixes views | pkg/common/system/memory_statement.go:185 + memory_admission.go |
~30 LOC + UT | P0 |
| F2 Graded slope + desynced timeout | D2: 719→28 cliff + synchronized 250 ms timeout | memory_statement.go (EnterStatement) |
~60 LOC + UT | P0 |
| F3 Share pressure state to write path | D3: entry gate closed while write gate keeps admitting | rscthrottler + budget exposes pressure |
~50 LOC | P1 |
| F4 Minimal Solution-4 landing | D4: reserve-absorption premise broken under the blind gate | 4b in-PR; 4a charge control as follow-up PR | ~20 LOC / separate | P1/P2 |
| F5 Observability | Diagnosis required reverse-engineering a 47 MB docker log | rejection diagnostics + metrics | ~25 LOC | P0 |
F1 — split the views (root cause of the incident)
At memory_statement.go:177–185, available := b.availableLocked(snapshot) is min(working-set view, raw-charge view) — dominated by the raw view under load — but the tripwire compares it against the full calibrated reserve (max(floor, 2×nonGoHW, 5%/10% capacity) + runtime). In the incident: used 79.3/84 GiB with ~30 GiB clean cache → raw view ≈ 4.3 GiB < reserve → false pressure, while the real working set was only 59%.
The min-of-two-gates is correct for hard admission (the raw gate must not assume kernel reclaim succeeds). Pressure scheduling asks a different question — how much working-set headroom remains? — and needs the matching view:
// memory_admission.go — pressure scheduling only; hard admission untouched
func (b *MemoryAdmissionBudget) availableForPressureLocked(s MemoryDomainSnapshot) uint64 {
used := s.Used
if s.Source == MemoryDomainSourceHost || s.IsCgroup() {
used -= min(used, s.Reclaimable)
}
rs := s; rs.NonGo = b.nonGoHighWater
return b.headroomLocked(s, used, b.policy.Reserve(rs))
}// memory_statement.go EnterStatement
hardAvailable := b.availableLocked(snapshot) // two-gate, unchanged
pressureAvailable := b.availableForPressureLocked(snapshot) // single consistent view
underPressure := pressureAvailable < b.policy.Reserve(reserveSample)
if snapshot.Measured && hardAvailable > 0 && atHead && (!underPressure || ...) { ... }Under the incident's shape, WS headroom ≈ 84−(79.3−30)−4.3 ≈ 30 GiB ≥ reserve → no false pressure. With genuinely dirty cache, Reclaimable≈0, the two views coincide → no false negatives either. The change only relaxes the throttle switch; the raw hard gate is byte-identical, so it is monotonically safe (it can only reduce false positives, never admit past the charged boundary).
UT: three cgroup fixtures — large clean cache must not trip / dirty cache must trip / raw crossing still rejects hard.
F2 — graded slope + desynchronized timeout
Replace the binary !underPressure || active < GOMAXPROCS cliff with a linear ramp and jitter the waiter expiry:
// limit = 1 for avail→0 (liveness floor), up to base at avail=reserve
func pressureLimit(base, avail, reserve uint64) uint64 {
if reserve == 0 || avail >= reserve { return math.MaxUint64 }
return max(uint64(1), 1+(base-1)*avail/reserve)
}
// waiter expiry: jitter to break the synchronized mass timeout
expires = now + timeout/2 + rand.N(timeout) // [0.5T, 1.5T]Backpressure then manifests as queueing latency instead of 26,326 client-fatal errors in 43 s (9.6% of measured tpmC window). F2 is the shape insurance once F1 removes the false trips.
F3 — propagate pressure to the write path
While the entry gate was closed, internal writes (flush-to-S3 etc.) still saw ~4.3 GiB raw headroom and kept admitting, feeding the pollution loop. Export a hysteresis-backed state:
func (b *MemoryAdmissionBudget) UnderPressure() bool
// enters when pressureAvailable < reserve; exits when > 1.25×reserve for 4 samplesrscthrottler: when under pressure, halve write/flush in-flight allowance (floor = existing minimum); restore on release;- add
mo_system_memory_pressuregauge.
F4 — Solution-4 minimal landing
- 4b (this PR, ~20 LOC): document/encode the contract "scheduling decisions use the working-set view; hard safety uses the raw view" (F1 + existing
hardAvailable>0), so the reserve-absorption claim holds exactly in the view where it is made; - 4a (follow-up PR): true charge control — bind clean-cache growth (
pkg/fileservice/cache.go, already touched here) to a budget share and proactively evict clean pages when raw headroom falls below threshold, instead of waiting for admission failures. This is also the one component whose policy must invert between container (cache is the enemy) and bare-metal (cache is a friend) deployments.
F5 — observability (P0, mechanical)
Add reclaimable=, raw_available=, ws_available=, pressure= to MemoryStatementAdmissionError fields, and a statement_rejected{reason} counter. This incident was only diagnosable by reverse-engineering a 47 MB docker log because these four values were missing.
Acceptance / verification
- Incident replay: embed fixture reproducing run 39216607157's memory shape (84 Gi cap, ~30 GiB clean cache, TPCC 1000W) → criteria: zero client-fatal errors, no pressure flap, post-load recovery ≤ the current 8 s;
- A/B performance: base vs candidate, same slot, ≥ 2 steady windows each — this still stands as the open performance acceptance;
- No false negatives: pin dirty cache, confirm pressure still trips;
- Existing UT/BVT green plus the new table-driven UTs.
F1+F2+F5 alone would have prevented this counterexample; F3+4a make the class structurally impossible.
Related to #29270
Problem and change
The current implementation completes the shared-domain and shared-admission mechanisms in schemes 1 and 2. Execution, write throttlers, public memory readers, remote compile sizing, vector-cache sizing and lock-retry pressure classification consume the published MemoryDomain snapshot. The reader supports cgroup v1/v2 and host layouts, inherited hard/soft limits, and last-good-sample retention on read failure. Hierarchy sizing/cache bounds remain separate from the binding usage/limit pair.
Production throttlers and execution allocations use one process-wide physical ledger by default, with component/CN/query quotas layered below it. The former independent RSS admission vetoes are retained only by explicit isolated test fixtures. Clean-cache working-set credit cannot bypass the charged cgroup hard/soft boundary.
Statement entry now uses a bounded, cancellable FIFO queue before transaction side effects. Healthy work is not concurrency-throttled; below one calibrated reserve of remaining physical headroom, new ordinary statements are limited by the scheduler capacity (configurable). Entry does not reserve a query cap or impose the removed fixed 256 MiB floor. Nested SQL borrows a live same-owner admission. Authentication, task control, bootstrap readiness and COMMIT/ROLLBACK retain bounded, physically accounted progress; nested execution does not close its parent's control allowance.
Defaults: MO_MEMORY_STATEMENT_MAX_QUEUED=1024, MO_MEMORY_STATEMENT_WAIT_TIMEOUT=250ms; MO_MEMORY_STATEMENT_PRESSURE_CONCURRENCY=0 derives the pressure-only limit from GoMaxProcs.
All outstanding reservations remain charged against hard-pressure headroom until Release. Acquire precedes allocation, and the existing interface has no allocation-complete ownership handoff; a reservation surviving a refresh is not evidence that its bytes are included in memory.current. For example, with usage 95/100, A reserves 4 and pauses before allocation. B's request for 4 is rejected both before and after a refresh reading 95. If A's allocation fails and A releases its reservation, B can proceed. Read failures retain the previous cgroup sample rather than erase the pending budget.
This deliberately conservative treatment can count already-resident reservations twice at hard pressure. It also declines to use RSS/reusable-page estimates as proof of cgroup coverage. The separate RSS reuse accounting is retained, but it cannot bypass the cgroup budget. Avoiding this conservative backpressure would require a valid allocation/ownership handoff; it cannot be inferred from reservation timing.
Validation
For the schemes 1/2 implementation:
Historical validation from earlier revisions (not relabeled as exact-head benchmark evidence):
go test -race -tags matrixone_test ./pkg/common/rscthrottlerpassed locally with repository CGO include/library paths after merging main at27ea64ab038c80cfc94ad4368315ab30d21e6d56.-race.git diff --checkpassed. New-head CI results remain pending.Outstanding performance and root-cause acceptance
This PR is not yet demonstrated to satisfy controlled memory AND no throughput/tail-latency regression. The reported f8 three-run 100W/1000T mean tpmC of about 13,291 versus d7's 15,304 is about 13.2% lower. Fewer pauses and no observed OOM support improved pressure control only. They do not prove admission correctness, performance neutrality, or a fix for the original TPCC memory-growth cause. Those runs also do not validate this newer conservative admission policy.
Before acceptance, build base and candidate from the same base revision; use an exclusive host and fixed slot, 84 GiB/no swap, identical data reset/warm-up and repeated A/B plus B/A runs. Compare accounting-only with accounting plus reclamation and retain pressure-time heap/CPU profiles, Go/native/mpool and FileService ownership metrics, cgroup memory.stat/events/pressure, cache/refault and I/O/commit-latency data. Report per-run throughput, tail latency, errors, peaks and post-cycle live memory together.
Historical or non-exclusive runs are not substitutes for the current-revision matched controls. No new matched A/B result or pressure-time memory attribution is claimed here. Performance and memory-source acceptance remain open for review.