Repository navigation
fix(process): discard stale automatic spill disk capacity samples - #30356
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: 8489663ac32b100fe7815e47a7e24a9ef8d8b75b
Assessment: approve
Reviewed the complete delta and affected ownership paths. The epoch check fixes stale spill-cap publication within the existing budget owner, preserves cap policies, and keeps filesystem I/O outside the admission lock. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Verified the frozen head, merge-base, patch equivalence and unchanged source. Reviewed reservation, growth, reconciliation, cleanup, competing refreshes and Process initialization.
-
Isolation preflight passed. Verified 192 native inputs and 19 retained artifacts against the repository-owned build evidence.
-
All 205 process tests passed normally and under -race; three targeted concurrency/Statfs tests each passed 100 race repetitions.
-
All spillutil and hashbuild tests passed: 37 and 136 tests respectively. go vet, gofmt and diff checks passed.
-
The unchanged base implementation, accessed through a diagnostic-only API adapter, reproduced the expected 117 GiB versus 192 GiB failure; the candidate passed.
-
Commands, source fingerprints, exits and logs are reconciled in /home/xupeng/.local/state/mo-bot/jobs/99ebfcd1b59508c10b7f74af/attempt-1/receipt-reconciliation.json.
Limitations:
-
Validation used Linux/amd64 and Go 1.27.1. No large-disk, BigData or performance benchmark was run; no attribution to BigData I7 is claimed.
-
Busy writers can defer refreshes; this remains an observed capacity budget, not a transactional filesystem quota.
-
Issue #30352's body was absent from frozen evidence. Review covered the explicit component contract in the PR; hosted CI execution logs were not independently audited.
Merge Queue Status
This pull request spent 2 hours 31 minutes 41 seconds in the queue, with no time running CI. ReasonPull request #30356 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.
HintYou 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. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #30352
What this PR does / why we need it:
An automatic spill-cap refresh can combine filesystem free space sampled before another statement removes its spill with the ownership ledger after that statement releases its reservation. For example, a 192 GiB cap becomes 117 GiB even though no external space was consumed. The active-envelope rule then prevents a fresh sample from restoring the cap, causing valid spill growth to fail.
Resolve the shared CN budget before sampling and validate a disk-budget epoch before publishing the observation. Reservation, growth, release, reconciliation and cap updates invalidate in-flight samples, including release/reserve ABA and overlapping refreshes. Sampling stays outside the resource mutex, so cleanup and admission remain independent of filesystem I/O.
An invalidated or unavailable observation keeps the previous finite cap until a later statement refreshes it; there is no retry loop. Coherent samples retain the existing external-pressure tightening, explicit floor, headroom and no-growth-while-active policy. This is still an observed capacity budget, not a transactional filesystem quota; busy writers can defer a refresh.
Validation on Linux/amd64, Go 1.27.1, with native dependencies built by
make cgo:pkg/vm/processtests: PASS (205 top-level tests); complete package under-race: PASS.-race -count=100: concurrent release, all invalidating transitions, and the real Process/LOCAL/Statfs boundary: PASS.pkg/sql/colexec/spillutilandpkg/sql/colexec/hashbuildtests: PASS (173 top-level tests total).go vet ./pkg/vm/process, incremental golangci-lint v2.14.0 (the Makefile-pinned version), gofmt andgit diff --check: PASS.No large disk allocation or full BigData run is claimed. These tests prove the #30352 component defect and its fix; available evidence does not establish that this release race caused I7 in BigData run 38762357515.