Repository navigation
fs cp -r: stop when files keep failing for 5 minutes - #7785
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
Contributor
|
Commit: Regression test reportSelected 4 changed tests (limit=20, 0 not selected) 4 tests: regression=4 unreleased=0 coverage=0 failing=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): same output as main (4e503ea) TestAccept/cmd/fs/cp-r-requests: branch ✅ | main (4e503ea) ❌ | latest (v1.26.0) ❌main (4e503ea): latest (v1.26.0): same output as main (4e503ea) 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: 5dbeb76
Top 7 slowest tests (at least 2 minutes):
|
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-keep-going
branch
from
November 18, 2026 19:02
4767c2b to
17ad766
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
from
November 18, 2026 19:03
85e902d to
ae58533
Compare
This was referenced Nov 18, 2026
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-keep-going
branch
from
November 18, 2026 19:37
17ad766 to
7d8cf4b
Compare
yuanjieding-db
force-pushed
the
yuanjieding-db/fs-cp-stall-timeout
branch
2 times, most recently
from
November 18, 2026 19:54
0194797 to
cd40cbd
Compare
During an outage every file fails, so keeping going would only work through the rest of the copy one failure at a time. If files keep failing and none has been copied for 5 minutes, the copy now starts no new files, lets in-flight ones finish and reports the rest as not attempted. Files that already failed once keep their error. A slow copy with no failures never stalls, and a created directory counts as progress. The timeout is internal, not a flag. DATABRICKS_FS_CP_STALL_TIMEOUT_MS is an undocumented test-only override. The clock is injectable, and unit tests use a fake one. 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
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 4.
Changes
If files keep failing and none has been copied for 5 minutes,
fs cp -rnow starts no new files, lets in-flight ones finish, and reports the rest as not attempted. Files that already failed once keep their error.Stopped: files kept failing and none was copied for 5 minutes.The timeout is internal, not a flag.
DATABRICKS_FS_CP_STALL_TIMEOUT_MSis an undocumented override for tests. The clock is injectable.Why
During an outage every file fails, so keeping going would only work through the rest of the copy one failure at a time.
Tests
TestRecursiveCopyStall(fake clock):TestStallTimesTheFailingPeriod: one failure after 6 healthy minutes with nothing completing doesn't stall; 5 minutes of failing does.TestPermanentErrorsDoNotStall: a 404 followed by a 6-minute listing doesn't stall.TestStallTimeoutFromEnvandTestFormatDuration.kartik-test: three 200 MiB files at--concurrency 1with a 5s timeout copy fine (see fs cp -r: keep going past failed files #7712).Self-review
Isaac review, 5 findings:
Mkdirnow resets the timer, with a test./code-review(medium), 8 findings:run. Listing is interleaved with copying, so the first files start right away.durationFromEnvresembles the retry interval parsing inlibs/retry. That one has different semantics, and this helper is 6 lines.Orchestrator review:
--concurrency 1with a 5s timeout, didn't reproduce onkartik-testbefore the fix: it exited 0 in 67s. The stall is only checked when a file starts, which happens right after a copy frees a slot. The fix still closes the rarer cases, like a slow listing with nothing in flight, and makes the rule explicit. After the fix, the same check exits 0 in 70s.Isaac review, second and third rounds: no findings.
/code-review(medium), second round, 10 findings:/code-review(medium), third round, 9 findings:Mkdirresets the timer during a write-only outage. During an outage the breaker holds the walk in place, so no new directories are created.libs/retry. It's test-only, as above.This pull request and its description were written by Isaac.