-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return a specific error if a file is still incomplete after FileWrite…
…r.Close Previously, we would simply ignore the result field on CompleteResponse, which lead to a silently hanging lease on the file. A hanging lease isn't that bad - it expires on its own - but it was causing the sneaky AlreadyBeingCreatedExceptions we were seeing in append tests. Exposing the error (and adding a function IsErrReplicating to unwrap the PathError, for convenience) allows the client to either ignore it, and let the lease expire on its own, or to retry in a loop, as the java client does, until the file is complete and the lease is destroyed. This has the potential to be a breaking change, since we would silently swallow the error before.
- Loading branch information
Showing
3 changed files
with
64 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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