Repository navigation
Retry overwriting file writes on unexpected EOF - #7611
Merged
Merged
Conversation
Writes with OverwriteIfExists are idempotent and already retry 5xx and the SDK inactivity timeout. Also retry the transport errors reads retry (unexpected EOF, REFUSED_STREAM): import-file uploads fail with "unexpected EOF" when the connection is cut mid-request. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 607ee14
Top 4 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Nov 15, 2026
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.
Why
File uploads to
POST /api/2.0/workspace-files/import-filesometimes fail with a transport error when the connection is cut mid-request.syncandbundle deploythen fail outright. On Azure this hit 14 tests in the last two weeks, mostly on main:integration/cmd/synctests and bundle acceptance tests that upload files.The retrying filer (
libs/retry) already retries overwriting writes on 5xx and on the SDK inactivity timeout, but withIsTransient, which leaves outunexpected EOF. #7129 addedunexpected EOFandREFUSED_STREAMretries for reads only. An overwrite is just as idempotent, and a 504 or inactivity timeout, which writes already retry, leaves the same uncertainty about whether the server applied the request.Changes
retryingFiler.WritewithOverwriteIfExistsnow usesIsTransientRead, the same check thatRead,ReadDirandStatuse. Writes without overwrite andDeletekeepIsTransient. Doc comments are updated to match.Tests
TestFilerRetriesWriteOnUnexpectedEOF: fails without the change and passes with it.go test ./libs/retry ./libs/sync ./bundle/deploy/...and thecmd/sync,bundle/syncandcmd/fsacceptance tests pass locally.Dashboard
Error: Post "[DATABRICKS_URL]/api/2.0/workspace-files/import-file/[PATH]": unexpected EOFThis pull request and its description were written by Isaac.