Retry rename on lock induced failures #16435
Merged
Conversation
Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix go-gitea#16427 Signed-off-by: Andrew Thornton <[email protected]>
If this PR succeeds at solving the problem we could/should include it in 1.15 |
6 tasks
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jul 15, 2021
Backport go-gitea#16435 Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix go-gitea#16427 Signed-off-by: Andrew Thornton <[email protected]>
lafriks
approved these changes
Jul 15, 2021
techknowlogick
approved these changes
Jul 15, 2021
This comment was marked as off-topic.
This comment was marked as off-topic.
33a8eec
into
go-gitea:main
1 of 2 checks passed
1 of 2 checks passed
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jul 15, 2021
Backport go-gitea#16435 Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix go-gitea#16427 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
lafriks
pushed a commit
that referenced
this issue
Jul 15, 2021
Backport #16435 Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix #16427 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: techknowlogick <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jul 16, 2021
Unfortunately go-gitea#16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix go-gitea#16439 Signed-off-by: Andrew Thornton <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jul 16, 2021
Backport go-gitea#16461 Unfortunately go-gitea#16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix go-gitea#16439 Signed-off-by: Andrew Thornton <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Jul 16, 2021
Backport go-gitea#16461 Unfortunately go-gitea#16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix go-gitea#16439 Signed-off-by: Andrew Thornton <[email protected]>
zeripath
added a commit
that referenced
this issue
Jul 16, 2021
Backport #16461 Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <[email protected]>
6543
pushed a commit
that referenced
this issue
Jul 16, 2021
Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <[email protected]>
techknowlogick
pushed a commit
that referenced
this issue
Jul 16, 2021
Backport #16461 Unfortunately #16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix #16439 Signed-off-by: Andrew Thornton <[email protected]>
AbdulrhmnGhanem
added a commit
to kitspace/gitea
that referenced
this issue
Aug 10, 2021
* Retry rename on lock induced failures Due to external locking on Windows it is possible for an os.Rename to fail if the files or directories are being used elsewhere. This PR simply suggests retrying the rename again similar to how we handle the os.Remove problems. Fix go-gitea#16427 Signed-off-by: Andrew Thornton <[email protected]> * resolve CI fail Co-authored-by: techknowlogick <[email protected]>
AbdulrhmnGhanem
added a commit
to kitspace/gitea
that referenced
this issue
Aug 10, 2021
Unfortunately go-gitea#16435 asserts the wrong error and should use os.LinkError not os.PathError. Fix go-gitea#16439 Signed-off-by: Andrew Thornton <[email protected]>
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.
Due to file locking on Windows it is possible for an
os.Rename
to fail if the files or directories are being used elsewhere.This PR simply suggests retrying the rename again similar to how we handle the equivalent problem in
os.Remove
.Fix #16427
Signed-off-by: Andrew Thornton [email protected]
The text was updated successfully, but these errors were encountered: