Repository navigation
fix(files): don't count the availability recheck TTL twice - #66982
Closed
silverkszlo wants to merge 1 commit into
Closed
silverkszlo wants to merge 1 commit into
silverkszlo wants to merge 1 commit into
Conversation
Signed-off-by: silver <s.szmajduch@posteo.de> Assisted-by: ClaudeCode:claude-opus-5-5
silverkszlo
requested review from
ArtificialOwl,
come-nc and
icewind1991
and
a balanced review from Copilot
and removed request for
a team and
Copilot
November 24, 2026 07:49
Member
|
duplicate of #66783 :) |
Contributor
Author
|
As this PR is a duplicate of #66783 , I have added a commit with the test there and am closing this PR here :) |
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
setUnavailable()stored last_checked = time() + delay, whileshouldRecheck()waits a furtherRECHECK_TTL_SECon top of that. A single failed request blocked a storage for 20 minutes instead of 10, and an auth failure for auth_availability_delay + 10 minutes instead of the configured delay. Only add the part of the delay that exceeds the TTL.Mechanism:
-> a storage wrapped by
OC\Files\Storage\Wrapper\AvailabilitythrowsStorageNotAvailableException-->
setUnavailable()callsStorage\Cache::setAvailability(false, $delay), which storeslast_checked = time() + $delay--->
shouldRecheck()then waits untiltime() - last_checked > RECHECK_TTL_SEC----> The commit set
$delay = RECHECK_TTL_SECfor every failure (andmax(auth_availability_delay, TTL)forStorageAuthException)-----> so the TTL is added on top of the stored delay.
Effect:
A single failed request on a federated share or external storage blocks the mount for 20 min instead of 10. Every file operation on it returns 503 in that window.
An auth failure (
StorageAuthException) blocks forauth_availability_delay+ 10 min: 40 min with the default 1800 s, where the docs say 30.SMB throws
StorageAuthExceptionfor connection errors as well, so a network drop on SMB also gets the 40 minutes.Checklist
3. to review, feature component)stable32)AI