Repository navigation
Stabilize CAS: fsck, GC liveness and S3 read fixes - #2941
Merged
Merged
Conversation
5 of 31 tasks
20 of 30 tasks
filimonov
added a commit
that referenced
this pull request
Nov 23, 2026
A SELECT with max_memory_usage = 1000000 hit `Query memory limit exceeded` in the first GET of a cold part manifest. The request loop treated it as a transport fault and re-issued the GET 53 times over about 110 s, then failed the statement with code 210 `NETWORK_ERROR` instead of 241 (test 04023_rollup_totals_memory_limit, job "Stateless tests (arm_binary, cas s3 storage, parallel)" of #2941). `CasOperation::read` takes an explicit `OnMemoryLimit` mode, default `Reissue`. The manifest GET of a cold `CachedForLoad` view build asks for `Propagate`, and a `MEMORY_LIMIT_EXCEEDED` from that attempt escapes without a re-issue. Every other read, every other error, the shared classifier and all write settlement keep today's behaviour. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A merge of a ~2,400-column table on an uncached object-storage disk held ~2,900 sessions per `Wide` source part, and the `Disk` group passed its warning limit. `ReadBufferFromS3` now releases the session right after a fill that completes an exact `HTTPFixedLengthStreamBuf` body; bounded and cut requests are unchanged. `ReadBufferFromIStream` gains the accessor `sourceBuf`. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
…cked archive member `ReadBufferFromFileView` never told the buffer under it where a packed archive member ends, so every member read on an object storage disk was an open-ended `GET`: a merge of a 2,400-column table reset ~8,100 connections. The view now passes its right bound down. `05112` asserts `DiskConnectionsReset <= 2` instead of a reuse count of the shared S3 connection pool. Upstream: ClickHouse#118483 (merge commit dc740cb) Upstream: ClickHouse#124776 (merge commit 9e2445a), only its `05112` part: `05110` tests ClickHouse#118480, which is not on this branch. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
One full `CAS*` run left ~3,000 `/tmp/cas_unit_*` directories; `/tmp` ran out of inodes and 738 tests failed. The storage object a helper hands out now owns its directory and removes it when its last owner is destroyed, also after a failed test. Only the creating process removes it. Test-only. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`SnapshotOverAnUnreadAddAndDropTakesNoDestructiveStep` failed ~1 in 2,000 runs: a filler append raced the snapshot publisher. The test and the `IntakePool` helper disable automatic publication, publish explicitly after the drop and assert that no log entry is left above the snapshot. Test-only. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
An interrupted cold admission left its `cas/ref_catalog` row `Creating` forever; every GC round then logged `frontier INCOMPLETE` and deleted nothing. The GC leader now cancels such a row by exact compare-and-swap once the creator's mount slot proves it terminal, and counts it in `CASGCStalledCreatingCancelled`. `cas-fsck` lists every `Creating` row. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
An online scan could reach a dropped table's life after GC erased its row and the janitor deleted its `_ckpt`; `chooseRecoveryGrounding` then built a `CORRUPTED_DATA` exception whose destructor logged an error. When the walk's first `_ckpt` read finds nothing, `walkRefStream` records a deferred `unchecked` verdict, reported only if the confirmation cut still names the life. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A GC round that committed between the `gc/state` read and the manifest pass made blobs of the older snapshot look like stale edges. A candidate now counts only if the `gc/state` read after the manifest pass still holds one of its edges, else in `stale_edge_superseded`. A GC shard refused without a run is named `<seal key>#shard-N`, so two such shards stay two findings. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A GC leader that lost its lease, `cas-gc-dryrun` and `cas-fsck` logged a `CORRUPTED_DATA` line for an adopted source-edge run that a newer round had already deleted. The fold now reads `gc/state` once before raising: a moved state ends the round `ABORTED`, and the two tools keep the absence as a refusal. Under an unchanged or unreadable state it still raises. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`gc_fold_begin` and `gc_fold_end` in `system.cas_log` carried the previous round's number, so `WHERE round = <Finish.round>` missed both. They now carry `state.round + 1`, the number the round's commit writes; a later attempt reuses it. The docs state which events carry which number. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`cas-fsck` gave a key under `blobs/` that does not parse the empty blob's identity, so it could take that body's class and even a hard `StaleEdge`. Such a key is now `Unaccounted` with a fixed note, before any lookup or request. The shared blob key parser returns no value only for invalid syntax and lets other exceptions, such as a memory limit, propagate. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`system.cas_mounts.server_uuid` showed the server UUID with its two 64-bit halves swapped, so it never equaled `serverUUID` or the `uuid` file. The new `casServerIdToUuid` parses the id with the codec it was built from; on-store bytes do not change. The stateless test takes fresh pool directories and a per-run disk name, and keeps the pool when its teardown is not confirmed. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
On a real object store `cas-fsck` looked hung: long phases printed nothing, and progress lines called rows and refs "objects" and "pages". Every phase that sends requests in proportion to the pool now prints a start line, ticks by item count, and ends with its count, its unit and seconds. The stdout summary and `SYSTEM CAS FSCK` are unchanged. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
An absent fold seal under a live `gc/state` printed no deletes and exited 0, like a healthy empty pool. A seal absent between two matching `gc/state` tokens is now damage (`CORRUPTED_DATA`); one absent because `gc/state` moved is read again. The command prints `snapshot=none|adopted`, and `test_cas_ref_snaplog` covers its exit status. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
After a pool migration GC needed 33 rounds and about an hour before its first complete cut, and no metric showed where the time went. The `fold_ref_intake` row of `system.cas_gc_log` now carries, for `ckpt`, `reflog` and `manifest`, reads issued, takes, awaited takes, wait and apply time, plus `cursor_resolves` and `cursor_resolve_us`. Decisions and requests are unchanged. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A `--partial` scan cut by its deadline exited 0 like a clean scan; it now fails with `TIMEOUT_EXCEEDED` after finding-specific errors and still prints `partial=1`. The deadline message named the next phase, not the running one; every deadline check now names the phase its progress lines print. `05488` scans a copy of the pool taken from `mktemp -d`. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
The bucket requirements page said what a bucket must support, but not what must not run on it: expiration rules, delete-rejecting policies, cold storage classes, versioning, other writers. It now lists them with what the server does, and states the rights each server needs and that the bucket's write credential is the pool's trust boundary. Docs only. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
With 1, a round that loses its commit can prune the generation the pool still adopts and wedge the next fold. 0 is refused with a message that says what to set; 1 loads as 2 with a warning, and the prune treats a `PoolConfig` value of 1 as 2. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
352 failed `CREATE`s during store stalls left 4 `Creating` rows that no leader may cancel while their server runs; they kept destructive GC suppressed on an emptied pool. Each GC scheduler tick a writable mount now cancels up to 16 of its own idle `Creating` rows, then reads the pool's terminal state again, and counts each cancel in `CASOwnCreatingCancelled`. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`04023_rollup_totals_memory_limit` on the CAS S3 lane: a `MEMORY_LIMIT_EXCEEDED` in the first `GET` of a cold manifest was re-issued 53 times for ~110 s and failed with 210. That read now fails at once. A query waiting on a build that failed on another query's memory limit builds the view itself, and builds coalesce per ref and resolved manifest, never across manifests. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A read that gave up said `CAS write could not be committed (read of ...)`. Non-write give-ups and lease refusals now say `CAS request did not complete (...)` with the verb of the request; code 210 and the write wording stay. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`RoundPointForTest::AfterDiscovery` fires once per folding round, after the intake setup and before the first manifest read; it changes no behaviour. Guards that pass on this tree: a bucket-level 404 on a ref-log read ends the round without a delete, and a leader deposed after discovery deletes no body. `GetHookBackend` runs a callback once before a matching `GET` is served. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A round proved a life's end only by reading an absent key at the end of its walk, so it chased writers: on S3 it folded ~14 ref logs/s against ~67 written and deleted nothing for 105 minutes. `planRefStops` now finds each life's first absent key by exact `GET`s before the first manifest read; the walk ends there and takes the bodies planning kept, counted in `CASRefLogBodyGets`. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
The walk's read-ahead fetched every id up to the listing's last one, listed or not, and pass 1 fetched records past its take budget and again in pass 2. It now hints only listed ids of the expected key's epoch, at or below the last key planning read present and at most the budget past the expected key, skipping bodies planning kept. Order, takes and decisions are unchanged. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
The 60 s slice cut pass 2 before the walk reached its planned stops, so with fast writers every round was suppressed. The slice is now 30 minutes. A stop request ends a background intake at its next step or its final poll, and the round deletes nothing. The round logs `CAS GC ref intake planned` and `... progress`; the `CASGCLastSuccessAgeSeconds` alert moves to 2400 s. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
GC treated every decode exception as a malformed body: a `MEMORY_LIMIT_EXCEEDED` on a valid log became a durable `BodyUndecodable` hold. Planning, the walk, `resolveRefCursorSuccessor` and the orphan sweep now hold or retain only on `isMalformedStoredRecordError`; any other error fails the operation and names the namespace and key. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A copy that lands between two lives' planning must keep every body a writer names. Each cell asserts from the request journal where the copy landed, that the read-ahead is in flight at its event, and which cut the round folded; width 16 runs two schedules. `GetHookBackend` gains `armAfterGet`, `holdGet` and `releaseHeldGet`. Test-only. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
The rights probe removed its object with a conditional delete, while GC removes intents without one: a bucket that allowed only conditional deletes passed the probe, then every GC round failed its intent cleanup. The probe now sends one unconditional single-object delete; tests that count deletes take their baseline after the open. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
A hardlink kept the source part's decoded manifest and its table runtime in the transaction until publication. A mutated part's projections share it for the part's whole life, so both stayed in memory and the runtime could not be evicted. A successful commit now drops them; a failed one keeps them. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`cas-gc-dryrun` prints the deletion intent of each standing row and the docs send the operator to `cas-inspect` with it, which refused the key with `BAD_ARGUMENTS`. `cas-inspect` now prints the blob and incarnation the key names, and refuses other bytes at an intent key with `CORRUPTED_DATA`. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
`cas-fsck` and the docs said replaced-body intents go "later"; GC removes each once no part references its blob. The upgrade text named the tool's last write as the point of no return for 26.6.x; it is M6, which raises the reader floor to 3. The GC page now says what resolving a cold cursor can cost and that read-ahead metrics match across widths only for the same completed work. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
filimonov
force-pushed
the
feature/antalya-26.8/cas-stabilization
branch
from
November 24, 2026 06:12
528db6e to
96d217d
Compare
The walk hinted only ref-log ids the round's listing returned. The listing is taken when the round starts, so records written while planning ran were below the planned stop but unlisted and were read one at a time: on S3 8,855 of 9,233 ref-log reads of a round waited inline, 141 ms each. `topUpLookahead` now hints every id of the current epoch above the expected one and at or below the last sequence planning read present there, within the existing distance bound. It never hints the stop, an id above that record, or another epoch. A hinted record that is absent, malformed or failed means what it means when read inline, and is dropped if the walk does not reach it. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
…ce test `SurvivingWriterIsFencedByTheRecreatedPoolsMount` expects the renewal to see a foreign occupant. A renewal landing between the prefix erase and the recreated pool's claim reads the slot as absent, is classified `vanished` and does not bump `CASMountReleaseSkippedForeignOccupant`, so the counter assertion failed intermittently under MSan. Gate non-test access to the mount slot until the recreated pool has claimed it. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
Each ref log's manifests were requested only when that log was decoded and were taken before the next log, so a run of single-edge logs read its manifests one at a time. On S3 that was 66 ms per applied log and 73 to 78 % of a 30-minute intake slice; a round under about 66 ref-log flushes per second never reached a complete cut. After the current log's own hints the walk now looks into ref-log bodies that are already here (kept by planning, or read ahead and present) for the next records of the same epoch and hints their manifests, at most the read-ahead window of them and no further than the walk may still take. It stops before a seal or a terminal record. Every take, decode, hold and counter stays at its ordered site; a repeated manifest key is observed once per edge; everything hinted ahead is discarded when the visit ends. `GcReadAhead::peekRead` and `RetainedRefBodies::find` borrow a body without taking it. `CASGCReadAheadWasted` now also counts reads a walk drops at a hold, the end of its slice or a stop request. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings in #2800 (orphan manifest sweep schedule). No textual conflicts. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
With #2800 the orphan manifest sweep runs on an interval, so the second round of the test lists four prefixes, not five. Signed-off-by: Mikhail Filimonov <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
filimonov
marked this pull request as ready for review
November 24, 2026 12:36
k-morozov
self-requested a review
November 24, 2026 14:48
k-morozov
approved these changes
Nov 24, 2026
k-morozov
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
I reviewed how GC walks the ref log during concurrent writes. This PR fixes the unbounded walk by setting a stopping point for each life_id before replay. We should evaluate whether a full LIST on Amazon S3 can provide that boundary without extra probes. If probes are still needed, we should explore running them in parallel across life_ids.
Collaborator
|
AI audit found no defects. No CI failures are PR-caused.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for the content-addressed storage (CAS) code and for S3 reads, each story a separate commit. They remove false
CORRUPTED_DATAlines from GC andcas-fsck, let GC make progress after an interrupted cold admission and let a GC round finish its ref-log intake on a remote store under steady writes, fix wrong values insystem.cas_logandsystem.cas_mounts, makecas-fsckreport progress and fail when its scan is cut short, and cut the S3 traffic of merges on wide tables.The series is 33 commits on
antalya-26.8after the merge of #2917, plus a merge of the base that brings in #2800 and one test adjustment after it (41f7c4935be: with the sweep on a schedule a round of that test sends fourLISTrequests, not five).Related: #2917
Related: ClickHouse#118483
Related: ClickHouse#124776
Changes
1b0dfe53112Widesource part; theDiskgroup went above its warning limit.ReadBufferFromS3returns the session right after a fill that completes a fixed-length body. ExactHTTPFixedLengthStreamBufonly; bounded and cut requests are unchanged.efdb940b0cestatistics.packedwere read with open-endedGETs.ReadBufferFromFileViewpasses its right bound down. Also the05112part of ClickHouse#124776: the test assertsDiskConnectionsReset <= 2, so it fails without the fix. Measured on that merge: resets 8,116 to 4, bytes read from the store 9.29 GB to 28 MB, merge 36 s to 20 s, merged part identical.44d5f2ea3a5CAS*unit run left about 3,000/tmp/cas_unit_*directories;/tmpran out of inodes and 738 tests failed.5a0b6fc6b7aIntakePoolhelper publish explicitly after the drop and assert that no log entry is left above the snapshot.d3d9d1c15c9cas/ref_catalogrow inCreatingforever; every GC round loggedfrontier INCOMPLETEand deleted nothing.CASGCStalledCreatingCancelled;cas-fscklists everyCreatingrow.0ffffdf9a49cas-fsckonline scan: GC erased a dropped table's row and the janitor deleted its_ckpt; the scan logged an error from the exception destructor._ckptread that finds nothing records a deferreduncheckedverdict and builds no exception.e0c948d3b4dcas-fsckreported blobs of an older snapshot as edges to absent manifests when a GC round committed during the scan.gc/statere-read after the manifest pass still holds one of its edges; otherwise it counts instale_edge_superseded, which is not a finding.e375d78cb55cas-gc-dryrunandcas-fsckloggedCORRUPTED_DATAfor an adopted run a newer round had already deleted.gc/stateread before raising: a moved state ends the roundABORTED; the two tools keep the absence as a refusal. An absent run under unchanged or unreadable state still raises.8ea160884bdgc_fold_beginandgc_fold_endinsystem.cas_logcarried the previous round's number.state.round + 1, the number the round's commit writes; docs list which events carry which number.f72f06b4d94cas-fsckgave ablobs/key that does not parse the identity of the empty blob.Unaccountedwith a fixed note, before any lookup or request. The shared blob key parser returns no value only for invalid syntax; other exceptions, such as a memory limit, propagate.c5b14f9cf40system.cas_mounts.server_uuidshowed the two 64-bit halves swapped relative to theuuidfile.casServerIdToUuidparses the id with the codec it was built from. On-store bytes do not change. Stateless test05487_cas_mounts_server_uuid.c3edc7a7380cas-fscklooked hung: long phases printed nothing.SYSTEM CAS FSCKare unchanged.2e2bd21fd10cas-gc-dryrunwith a missing adopted fold seal under a livegc/stateprinted an empty preview and exited 0.gc/statetokens is damage (status 1,CORRUPTED_DATA); agc/statethat moved gives a re-read. Output gains `snapshot=nonebc069526de7fold_ref_intakerow ofsystem.cas_gc_logreports reads, takes, awaited takes, wait and apply time forckpt,reflogandmanifest, pluscursor_resolvesandcursor_resolve_us. Requests and decisions are unchanged.ca228d7e1a4cas-fsckscan cut by--timeout --partialexited 0, like a clean scan; the deadline message named the next phase, not the running one.TIMEOUT_EXCEEDEDand still printspartial=1. Every deadline check names the phase whose progress lines are printing. Stateless test05488.1a7bd8566c66d1cc67d70cgc_snapshot_generations_to_keep = 1a round that loses its commit could prune the generation the pool still adopts and wedge the next fold.0is refused when the disk configuration is loaded, with a message that says what to set.1is loaded as2with a warning. To keep many generations set a large number.c246c7f73d7Creatingcatalog row for as long as the creating server kept running: 4 rows after 352 failedCREATEs during store stalls.Creatingrows by exact-row conditional write, then reads the pool's terminal state again, so a round does not start whileSYSTEM CAS FORGETwaits. NewCASOwnCreatingCancelled.7ce535b2bc304023_rollup_totals_memory_limiton the CAS S3 lane: aSELECTthat hitMEMORY_LIMIT_EXCEEDEDin the first read of a cold manifest was re-issued 53 times for about 110 s and failed with code 210.c442bb925aeCAS write could not be committed (read of ...).CAS request did not complete (...)with the verb of the request. Code 210 and the write wording for writes are unchanged.953d635de9dRoundPointForTest::AfterDiscoveryfires once per folding round and changes no behavior;GetHookBackendruns a callback before a matchingGET. Guards: a bucket-level 404 on a ref-log read ends the round without a delete; a leader deposed after discovery deletes no body.2b5840211d2planRefStopsfinds each life's first absent key by exactGETs before the first manifest read. The walk ends there and takes the bodies planning kept, counted inCASRefLogBodyGets.54d426a1af70fcd9957ab8SYSTEM CAS GC STOPandSYSTEM CAS FORGETend a background intake at its next step or its final poll; the round then deletes nothing. The round logsCAS GC ref intake plannedand... progress. TheCASGCLastSuccessAgeSecondsalert example moves to 2400 s.2b94ac8a4aaMEMORY_LIMIT_EXCEEDEDon a valid log became a durableBodyUndecodablehold.resolveRefCursorSuccessorand the orphan sweep hold or retain only onisMalformedStoredRecordError. Any other error fails the operation and names the namespace and key.fef9834806bGetHookBackendgainsarmAfterGet,holdGetandreleaseHeldGet.cdc5491e6faccc25b65b768c637908c6bcas-gc-dryrunprints the deletion intent key of each standing row, and the docs send the operator tocas-inspectwith it, which refused the key withBAD_ARGUMENTS.cas-inspectprints the blob and incarnation the key names, and refuses other bytes at an intent key withCORRUPTED_DATA.96d217db629cas-fsckand the docs said replaced-body intents are removed "later"; the upgrade text named the wrong point of no return for 26.6.x.1a46fd2f57eGETabout 141 ms) 8,855 of 9,233 ref-log reads of a round waited inline: the walk read ahead only ids the round's listing returned, and the listing is older than the planned stop.b7dd5b6ad46CASRefContiguousAlloc.SurvivingWriterIsFencedByTheRecreatedPoolsMountfailed under MSan in CI: the survivor's lease renewal could read its mount slot absent between the prefix erase and the recreated pool's claim.143dc40873aCASGCReadAheadWastedalso counts those.Risks / notes
1b0dfe53112touchessrc/IO/ReadBufferFromS3.cpp,src/IO/S3/ReadBufferFromGetObjectResult.*andsrc/IO/ReadBufferFromIStream.h;efdb940b0cetouchessrc/IO/ReadBufferFromFileView.cpp. Every object-storage reader is affected, not only CAS. The other commits are CAS code, tests and docs.cas_gc_io_concurrency = 16; 18,046 and 13,568 at 48). Rounds took 764 s and 2,232 s at 16; 281 s, 854 s and 1,437 s at 48. Each round was longer than the one before and the object count was still rising when the load stopped: a steady state under this load is not shown. The intake rate grows withcas_gc_io_concurrency.SYSTEM CAS GC RUNis not interrupted by a stop request:SYSTEM CAS GC STOPwaits until that round ends. The 30-minute slice bounds only pass 2, so a manual run on a large backlog can exceed it. If the client'sreceive_timeoutexpires first, the round continues and may delete.gc_snapshot_generations_to_keep = 0makes the disk refuse to load, and the diagnostic tools refuse it too. Set a large positive number before upgrading.1loads as2with a warning.1b0dfe53112does not release sessions on bounded or cut requests.d3d9d1c15c9leaves a row from a failed cold admission on a server that keeps running untilc246c7f73d7cancels it or that server restarts.44d5f2ea3a5leaves the directory of a re-executed death-test child that exits throughstd::_Exit.GETper scheduler tick on every writable mount.Testing
1a46fd2f57ewere each built and ran their own suites on a tree that differs from the branch only by files the series does not touch. The last three were built and tested together with them.gtest_cas_decode_errors.cpp, because a sanitizer build does not chargeoperator newto the memory tracker.05487,05488,05489and05814pass on the local-disk CAS lane.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
CAS (content-addressed storage): garbage collection no longer stalls on a catalog row left by an interrupted cold admission, plans each ref log's stop by exact reads, reads ref logs and their manifests ahead so a round can finish its intake on a remote store under steady writes, and stops its ref intake on request.
cas-fsckandcas-gc-dryrunno longer report false corruption,cas-fsckshows progress per phase and fails when its scan is cut short, andsystem.cas_mounts.server_uuidand the round column of fold events insystem.cas_logshow correct values.gc_snapshot_generations_to_keep = 0is refused and1is loaded as2. S3 reads return their connection to the pool as soon as a fixed-length body is read, and reads of a packed archive member are bounded to the member, which removes most connection resets and extra traffic in merges of wide tables.Documentation entry for user-facing changes
CI/CD Options
Exclude tests:
Regression jobs to run: