Repository navigation
feat(serverless): log VolumeCache hydrate range retries - #709
Merged
Merged
Conversation
deanq
requested review from
a team and
KAJdev
and
a balanced review from Copilot
November 10, 2026 20:46
There was a problem hiding this comment.
🟡 Changes recommended
Concurrent range failures can overcount failed files, metadata rejection can prevent manifest mtime restoration, and parallel sync races can make syscall-count tests flaky.
3 open issues
What changed in this PR
This PR improves VolumeCache observability for slow or failed hydrates and reduces repeated metadata-permission logging on network volumes.
Changes:
- Adds per-range retry logs, a retry-threshold warning, and retry/failure counts in hydrate summaries.
- Introduces per-operation metadata handling to suppress repeated EPERM logs and metadata calls.
- Adds tests for retry instrumentation, concurrency, and metadata failures, plus logging documentation.
| File | Description |
|---|---|
tests/test_serverless/test_utils/test_rp_volume_cache.py |
Adds retry-count, logging, concurrency, and metadata-error tests. |
runpod/serverless/utils/rp_volume_cache.py |
Implements hydrate statistics, retry logging, and shared metadata policy. |
docs/serverless/volume_cache.md |
Documents retry summaries, warnings, and EPERM handling. |
Review effort: Balanced
deanq
force-pushed
the
deanq/sls-995-volume-cache-retry-logging
branch
3 times, most recently
from
November 10, 2026 22:54
7366df7 to
c7934f9
Compare
Hydrate retried transient FUSE errors silently, so a hydrate slowed by geesefs pressure could not be diagnosed from logs. - Log each range retry at debug with errno, attempt, file, offset - Warn once when a hydrate passes 64 range retries - Add range retries and ranges given up to the hydrate summary log - Detect metadata EPERM once per sync/hydrate and skip later utime/chmod calls instead of logging a debug line per file
- count a failed hydrate file once, not once per in-flight range - track metadata EPERM per op so a chmod rejection no longer stops later files from getting the manifest mtime - pin single-worker sync in the two EPERM syscall-count tests
deanq
force-pushed
the
deanq/sls-995-volume-cache-retry-logging
branch
from
November 11, 2026 00:51
eae06bb to
5145298
Compare
jhcipar
approved these changes
Nov 11, 2026
Promptless documentation updates
|
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.

Summary
VolumeCache hydrate now logs its range retries and reports retry and failure counts. A volume that rejects metadata updates now produces one EPERM log line per operation instead of one per file.
Why
Hydrate retries a byte range up to 8 times, with backoff, on ENOMEM/EIO/EAGAIN, and it logged nothing when it did. A hydrate slowed down by FUSE (geesefs) pressure couldn't be diagnosed from logs; benchmarking had to monkeypatch
_copy_rangejust to count retries.Changes
VolumeCache: retrying <src> at offset <off> after ENOMEM (attempt N/8)._HYDRATE_RETRY_WARN_THRESHOLD = 64range retries. Isolated retries are normal on object-store mounts and stay at debug level. Past this point backoff is materially slowing the hydrate.hydrated N file(s)line now ends with(range retries: R, ranges given up: G). It is also logged when retries or failures happened but no file was restored; that case used to log nothing.hydrate()still returns the file count, so the API is unchanged._HydrateStatsobject holds them, guarded by a lock because ranges copy in parallel. Itsas_dict()is meant to be folded into structured metrics later. The instrumentation never raises into the caller._MetadataPolicyrecords the first EPERM fromutime/chmod, logs it once, and skips both calls for the rest of that sync or hydrate. Errors other than EPERM are still logged per file. Reconciliation compares against the metadata recorded in the manifest, so skipping these calls is safe.docs/serverless/volume_cache.mdhas a new "Logging" section.Test plan
os.pread/os.utime/os.chmod:make quality-check: 2835 passed, coverage 94.39%