Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
This is 4.2-dev-specific unresolved-defect tracking, not a claim that the main fix regressed.
- [Bug]: FileService: concurrent disk-cache hits duplicate reads/decodes and can evict warm entries before key deduplication #28898 documented concurrent warm DiskCache read/decode amplification and was closed after the main fix fix(fileservice): coalesce same-key warm disk-cache column fills #28918.
- [Bug]: Main Wiki IVF throughput drops across Oct 9-11 (only/POST 970 -> 432 -> 160 QPS); regression attribution pending #29868 also contains historical 4.2 evidence, but is closed. In particular, this Oct 12 comment already observed the mechanism on unchanged 4.2 images.
- The tested 4.2 image and the current 4.2-dev source still lack equivalent warm-disk-fill coordination. Closing the main issue did not resolve this branch's problem.
- Open [Bug]: 10M IVFFlat workload intermittently closes RPC/backend connections #27757 tracks connection failures. The successful POST rounds and repeated reads below require separate tracking from those failures.
- Open [Tracking]: main → 4.2-dev 重要修复回迁评审清单(2026-09-04~11-04) #32157 is a general backport review list and currently does not list fix(fileservice): coalesce same-key warm disk-cache column fills #28918. Its fix(fileservice): correct cache accounting and reclamation #29092 FIFO item is a different defect, not same-key disk-fill coordination.
No open branch-specific Issue or open #28918 backport PR was found in the searches listed below. A closed historical issue should not leave a confirmed affected branch without active tracking.
Branch Name
4.2-dev
Commit ID
- Observed nightly:
7283f12d0eaf919e253dab4ed0d7dc0828c6ff8e. - Previous nightly:
88e5fb541768ff65e2220f520e7edd9647034635. - Current 4.2-dev source checked on 2026-11-05:
9d07606dd04b358bd8d1b704fb0e7101a1aaa116. The same path remains; this is source verification, not a fresh nightly on this head. - Related main fix fix(fileservice): coalesce same-key warm disk-cache column fills #28918: merge
77202a6e9f23885fc7884a33e76256e10871d432. It is not an ancestor of the tested/current 4.2 commits; the equivalent behavior was also checked in source, rather than relying only on ancestry.
Other Environment Information
- Observed IVF job.
- Performance publishing job.
- Resource check.
- Namespace:
mo-42-family-41853763768-1. - Image digest:
sha256:d0f6ed5029ae4ce688253fcb282c97e00c72ba32f22eccf53f355fbf5e1738f8. - Topology: 1 TP + 2 AP CNs; each AP has 14 CPU / 55 GiB memory and 16 GiB SHARED MemCache.
- Vector benchmark:
0bae04528673d7756c4ee2478ac8e4e41f54df1b, unchanged in the compared runs. - Wiki IVF 10M, 768 dimensions, 100 workers, 10,000 queries per round, K=10, probe=5,
ivf_preload_entries=0. - No pod restarts in the final receipt for this run. This report does not attribute the slowdown to OOMKilled.
Actual Behavior
1. Completed POST rounds remain slow without query errors
| Mode | Previous R2 QPS | Current R1 QPS | Current R2 QPS |
|---|---|---|---|
| only/POST | 507.83 | 20.11 | 62.28 |
| filter/POST | 506.63 | 123.75 | 99.66 |
| threshold/POST | 437.66 | 130.93 | 144.11 |
All six current POST rounds completed with zero reported query/connection errors. Current only/POST R2 P50/P95/P99 are 963.19 / 5632.27 / 8922.22 ms. Relevant recall values are close; only/POST is 0.7556 versus 0.7586.
These numbers establish an observed performance problem, not a controlled introducing-PR regression ratio. The entire group is degraded, physical object/cache states differ, and the preceding PRE phase has failures. See the limits below.
2. Runtime logs prove independent concurrent reads of the same extent
Current only/POST R2 runner markers:
- UTC: 2026-11-04 18:50:05.103 - 18:52:48.474.
- Beijing: 2026-11-05 02:50:05.103 - 02:52:48.474.
- Timed query work is approximately 160.6 s; the marker interval also includes setup/reporting.
On AP nightly-regression-dis-ap-cn-6pp5f, one exact extent is:
path: 01a1a7b8-625c-790b-97f9-ae82b2ebe18f_00000
offset: 76356449
size: 25385955 bytes
There are 30 distinct slow-event records, finishing at 18:50:20.473231 - 18:50:21.340606 UTC, each with its own io.ReadFull and ToCacheData. They use the same pod, path, offset and size, not merely the same table or logical row. The events record the DiskCache path and not an S3 read or IOMerger wait.
One representative record contains:
io.ReadFull begin 125.945us
io.ReadFull end 113.672431ms
ToCacheData begin 113.673672ms
ToCacheData end 251.788122ms
Read return 504.779563ms
Reconstructed event intervals overlap substantially, approximately 20 simultaneous ReadFull calls when anchored to the server log timestamps. This concurrency estimate is approximate, not a hardware queue-depth measurement. The separate read/conversion calls are directly logged and do not depend on the overlap estimate.
The 30 reads account for 761,578,650 logical bytes (~726.3 MiB) for that one ~24.2 MiB extent. This is FileService logical work, not an attribution of physical device bytes. The retrieved slice reached its 800-record limit, so it is a concrete example, not an exhaustive count or estimate of all R2 duplication.
Two other extents in the same slice have 19 and 17 independent read/conversion records respectively. This is not only a single new object fetched once.
3. Metrics corroborate an expensive local-cache path on one AP
Mean of the process-wide rate(...[1m]) samples evaluated inside the R2 interval:
| Metric | AP 6pp5f | AP gs6dw |
|---|---|---|
| CPU cores used | 13.59 / 14 | 1.57 / 14 |
| Block-device read rate | 1076.65 MiB/s | 5.89 MiB/s |
| DiskCache hit entries/s | 1030.61 | 1.67 |
| S3-served entries/s | 1.97 | 0.47 |
| DiskCache-read duration sum rate | 78.72 s/s | 0.13 s/s |
| Cached-data conversion duration sum rate | 48.99 s/s | 0.02 s/s |
| S3-read duration sum rate | 0.56 s/s | 0.02 s/s |
The previous only/POST-near window shows almost all memory hits, fewer than one DiskCache hit entry/s on each AP, and approximately 1.85 MiB/s / almost zero device reads.
These are process-wide rolling samples, not SQL-exclusive counters. The previous R2 is shorter than one minute, so that window also includes R1. Duration sums include concurrent/nested operations and must not be added or interpreted as wall-time/CPU percentages. Cache entry counts are not bytes, unique objects, or disk IOPS. Device accounting does not prove the PVC's hardware throughput limit was reached.
4. Exact 4.2 source explains the duplicate-work path
At the tested commit:
S3FS.Readchecks MemCache, and defers MemCache publication.- It enters DiskCache before IOMerger.
DiskCache.ReadinvokesIOEntry.ReadFromOSFile;setCachedDatainvokes the conversion callback.- A complete DiskCache hit returns at
s3_fs.go:752, without reaching IOMerger around line 791. - Concurrent memory misses can therefore independently perform the expensive read/conversion before a decoded cache entry becomes reusable.
The current 4.2-dev source retains this order and does not have main's eligible warm disk-fill coordination.
This is the concrete defect being tracked. We have not proved a new FIFO bug, a memory leak, or the exact per-key eviction chain in this nightly. The problem is avoidable duplicate work under concurrent misses, not the mere existence of capacity misses.
Expected Behavior
For eligible concurrent reads of one immutable extent, reuse a completed in-flight fill/publication where feasible instead of multiplying large disk reads and conversions solely because they started before publication.
Any 4.2 fix must preserve bounded admission, cancellation, timeout/failure fallback, FileService close behavior and ordinary cold/different-key reads. It must not require unlimited caching, stable single-CN routing, a globally serialized disk queue, or unrelated cache-budget changes.
Steps to Reproduce
- Use the linked 4.2 Wiki workload and retain its frozen query/input/configuration receipts.
- Inspect only/POST R2, where all 10,000 queries complete without errors.
- Query the AP's FileService slow-event logs and group by
(pod, path, offset, size). Verify each occurrence contains its own ReadFull/conversion rather than counting repeated log summaries. - Correlate with FileService counters and main-container device/CPU metrics, respecting scrape/window boundaries.
Reproduction status: this report independently re-read the actual nightly artifacts and historical Loki/Prometheus data and reviewed the exact running/current code. It did not rerun the 10M test or execute a new 4.2 deterministic UT. #28898 contains a main-branch mechanism reproduction; it must not be represented as fresh 4.2 validation.
For a deterministic 4.2 fix gate, adapt the existing FileService fixture: warm DiskCache, arrange concurrent misses for one immutable extent, measure actual reads/conversions, verify returned bytes and cleanup, then compare baseline/candidate. Include different-key, memory-hit, cold, admission-limit, cancel/close and leader-failure controls before workload validation.
Additional information
What this report does not attribute
- Prior only/PRE completed two rounds/20,000 queries and reached 598.16 QPS in R2. Current only/PRE has just 179 successes before ingress failure, 9,821 failed/short-circuited records, and no R2. Thus the POST cache starting conditions differ. Current POST R1 itself is complete yet R2 remains slow; missing prior warm-up is not established as the entire explanation.
- Actual Merge completions for Wiki base table
273246occur during current R2, includingMT-30010at 18:50:07.154763 andMT-31676at 18:51:58.739048 UTC. Hidden secondary table273249also merges. Merge is not merely inferred from periodic scheduler messages, but its exact contribution and the role of that hidden table have not been fully mapped. - The intervening 4.2 commits are fix(backup): use logical file sizes for MinIO stream copies on 4.2-dev #32080, fix(agg): preserve grouped MEDIAN results across chunks and spills on 4.2-dev #32152 and fix: bound CN spill runs by bytes 4.2-dev #32155. No fixed-physical-data A/B identifies any of them as the introducing commit. Historical same-version 4.2 evidence in [Bug]: Main Wiki IVF throughput drops across Oct 9-11 (only/POST 970 -> 432 -> 160 QPS); regression attribution pending #29868 already shows this mechanism predates them.
- The main fix fix(fileservice): coalesce same-key warm disk-cache column fills #28918 is a design/validation reference, not a claim that it can be mechanically cherry-picked into 4.2 or that it will recover all of the observed QPS loss. Its prerequisites, narrow eligibility and later changes need branch-specific review.
Search and scope decision
Rechecked open Issues/PRs using 28898, 28918, DiskCache 4.2, cache coalescing, and Wiki 4.2; read the closed original issues and open #32157. #30167 is ENOSPC directory capacity, #30755 is shared-service ownership, #27757 is connection availability, and #29092 concerns FIFO reclaim behavior. None replaces active tracking of this observed 4.2 same-key warm-cache duplication.
Acceptance requires validation on the affected 4.2 branch. A main-only merge, one successful nightly, or a change to the global performance-series identity is not sufficient to close this issue.
Activity
XuPeng-SH commentedon Nov 7, 2026
#28918 backport evaluation: not portable to 4.2-dev as a cherry-pick
Tried
git cherry-pick 77202a6e9f(the #28918 merge) against current 4.2-devff8632534e:pkg/fileservice/s3_fs.goconflicts on the Read-path fill-coordination block, andpkg/fileservice/shared_decode.go/shared_decode_test.goarrive as source-side-only files.pkg/fileservice/has noshared_decode.goand zeroDecodeSharingreferences (git ls-treeandgit greponff8632534eare both empty); the merge base2758eb1d3f812759c03c7c8a7463e2757dacb633also has none.5b5edde8f87, 12 files, +1487/−9): scoped object-column decode sharing with bounded admission. fix(fileservice): coalesce same-key warm disk-cache column fills #28918 (+973/−21) coordinates the warm DiskCache fill exactly on that registry (prepareSharedDecodeForRead, per-key fill tickets, generation/participant bounds, bounded waits), so it cannot compile without the perf(fileservice): share scoped object-column decompression #28413 layer.Conclusion: landing this fix on 4.2-dev first requires a maintainer decision to backport the #28413 feature, then re-applying this fix, with the full
pkg/fileservicenormal + race validation replayed. That is a feature backport, not a cherry-pick, so no backport PR was opened for this item and this issue remains the tracker. A 4.2-local minimal coordination design was not attempted (it would be a new change, not a backport).The other two items from this batch are up: #32249 -> PR #32347, #32244 -> PR #32346.
fix(fileservice): coalesce same-key warm disk-cache column fills (#28918
LeftHandCold commentedon Nov 28, 2026
4.2 field validation after #32361: Nov 28 Wiki 10M job, immutable build selection. Wiki tested
0e568746d2d3093a4356c874641ae3aa57365369, which contains0351bc89d7(#32361). All times here are Nov 27 UTC.82f2-775e-bfb1-c5ddb646fdda_00000, offset 107191, size 25,305,920 bytes) each recorded DiskCache,io.ReadFullandToCacheData; elapsed times 506-646 ms. This is repeated logical local-cache work, not proof of seven physical disk or object-store reads.mo_fs_shared_decode_totaldeltas:bypass_admission +1572,bypass_timeout +23,conversion +1708,leader +113,reuse +222. These are pod-wide 30-second counts, not per-query attribution. Sharing was active, not disabled; the bounded implementation intentionally allows fallback. These counters do not identify the rejection reason for that specific extent.This is evidence of residual warm DiskCache read amplification in a real PRE startup burst, not proof that #32361 is broken, that the repeated reads explain the full stall, or that main shares this cause. To discriminate: repeat only threshold/PRE on the same index/AP with synchronized vs staggered first-wave dispatch; keep the measured workload unchanged otherwise, and compare per-extent duplicate fills, sharing outcomes and subsequent steady-state latency. Do not raise the sharing budget without a memory-pressure control.