Repository navigation
fs cp -r: back off during failure bursts - #7786
Draft
yuanjieding-db wants to merge 1 commit into
Draft
yuanjieding-db wants to merge 1 commit into
yuanjieding-db wants to merge 1 commit into
Conversation
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 18:14
6d97669 to
85e902d
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-breaker
branch
from
November 18, 2026 18:14
af4903e to
717bb8b
Compare
Contributor
|
Commit: Regression test reportSelected 6 changed tests (limit=20, 0 not selected) 6 tests: regression=6 unreleased=0 coverage=0 failing=0
TestAccept/cmd/fs/cp-r-keep-going/burst-retry-after: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): TestAccept/cmd/fs/cp-r-keep-going/outage-past-stall: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): TestAccept/cmd/fs/cp-r-keep-going/persistent-500: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): TestAccept/cmd/fs/cp-r-keep-going/single-500: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): TestAccept/cmd/fs/cp-r-requests: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): TestAccept/cmd/fs/cp/dir-to-dir: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): same output as main (4e503ea) |
Collaborator
✅ Integration test reportCommit: 54d8012
Top 6 slowest tests (at least 2 minutes):
|
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 19:03
85e902d to
ae58533
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-breaker
branch
from
November 18, 2026 19:03
717bb8b to
7c7d3c8
Compare
This was referenced Nov 18, 2026
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 19:37
ae58533 to
0194797
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-breaker
branch
from
November 18, 2026 19:38
7c7d3c8 to
bdcee00
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 19:54
0194797 to
cd40cbd
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-breaker
branch
from
November 18, 2026 19:54
bdcee00 to
4a552ce
Compare
Keeping going during a burst of failures sends a failing request for every file. After --concurrency consecutive retryable failures with no success in between, a circuit breaker now opens: no new files start, and one deferred file at a time is probed, waiting 2s, 4s, ... up to 30s between probes. A Retry-After hint is honored, capped at 30s. The first success closes the breaker. Opening and closing it is logged at info, each probe at debug. DATABRICKS_FS_CP_PROBE_BACKOFF_MAX_MS is an undocumented test-only override of the 30s cap. Sleeping is injectable, and unit tests use a fake clock. The acceptance tests cover a 500 burst with Retry-After, and an outage longer than the stall timeout, which needs the breaker's waits to reach the timeout. Co-authored-by: Isaac <no-reply@databricks.com>
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 20:05
cd40cbd to
5dbeb76
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-breaker
branch
from
November 18, 2026 20:05
4a552ce to
54d8012
Compare
This branch has not been deployed
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.
Stack. Each PR is based on the one before it, so its diff shows only its own change.
This is part 5.
Changes
After
--concurrencyconsecutive retryable failures with no success in between, a circuit breaker opens:Retry-Afterhint is honored, capped at 30s.--concurrency 1, one retryable failure opens the breaker, so each transient error costs at least a 2s pause before the next file.admitruns on the walker goroutine (now noted in a comment).DATABRICKS_FS_CP_PROBE_BACKOFF_MAX_MSis an undocumented override of the 30s cap, for tests. Sleeping is injectable.Why
Keeping going during a burst of failures sends a failing request for every file and adds to the load on a service that is already struggling.
Tests
Retry-Afterabove the backoff, andRetry-Aftercapped at 30s, with the probe order and the log lines;Retry-Afteruntil a success, and closing on success;retryAfterfor both SDKs, and the env override.burst-retry-after: six 500s withRetry-After: 1open the breaker, and every file is copied.outage-past-stall: uploads fail for longer than a 2s stall timeout, and the copy stops and reports. This is fs cp -r: stop when files keep failing for 5 minutes #7785's end-to-end scenario: it needs the breaker's waits to reach the timeout.Self-review
Isaac review, 1 finding:
TestRecursiveCopyBreakerOnDeferredPasscovers it now./code-review(medium), 8 findings:Retry-Afterin the HTTP-date form is ignored. The DBFS SDK retries 429 and 503 itself, and the seconds form is honored.Retry-Afteris held until a success. That's intentional: a later 500 without a hint must not erase a 503's hint.--concurrency 1opens the breaker on one failure. The spec sets the threshold to--concurrency.admitreturns one bool for both "stopped" and "copied as the probe". Both mean "don't start it",admitrecords a not-started file itself, and it has one caller.This pull request and its description were written by Isaac.