Repository navigation
fs cp -r: back off during failure bursts - #7786
yuanjieding-db wants to merge 1 commit into
Conversation
6d97669 to
85e902d
Compare
af4903e to
717bb8b
Compare
Regression test report ✅Commit: Selected 9 changed tests (limit=20, 0 not selected) 25 tests: regression=25 unreleased=0 coverage=0 failing=0
TestAccept/cmd/fs/cp-r-keep-going/burst-retry-after: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): same output as main (f504773) TestAccept/cmd/fs/cp-r-keep-going/outage-past-stall: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): same output as main (f504773) TestAccept/cmd/fs/cp-r-keep-going/persistent-500: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): same output as main (f504773) TestAccept/cmd/fs/cp-r-keep-going/single-500: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp-r-requests: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): same output as main (f504773) TestAccept/cmd/fs/cp/dir-to-dir: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): same output as main (f504773) TestAccept/cmd/fs/cp/matrix/dir/DST=dbfs/SRC=dbfs: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=dbfs/SRC=local: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=dbfs/SRC=volume: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=local/SRC=dbfs: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=local/SRC=local: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=local/SRC=volume: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=volume/SRC=dbfs: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): TestAccept/cmd/fs/cp/matrix/dir/DST=volume/SRC=local: branch ✅ | main (f504773) ❌ | latest (v1.28.0) ❌main (f504773): latest (v1.28.0): 11 more failure details omitted, see the full report in the run. |
✅ Integration test reportCommit: 6cdf97e
Top 3 slowest tests (at least 2 minutes):
|
85e902d to
ae58533
Compare
717bb8b to
7c7d3c8
Compare
ae58533 to
0194797
Compare
7c7d3c8 to
bdcee00
Compare
0194797 to
cd40cbd
Compare
bdcee00 to
4a552ce
Compare
cd40cbd to
5dbeb76
Compare
4a552ce to
54d8012
Compare
|
Heads-up: #7975 removed the To fix: use |
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>
54d8012 to
6cdf97e
Compare
5dbeb76 to
275cebc
Compare
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.