-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry rename on lock induced failures (#16435) #16439
Conversation
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 <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
The 1.14.5 does not solve the issue. But there is now a different error message:
|
This is why I asked you people to test this. |
if err == nil { | ||
break | ||
} | ||
unwrapped := err.(*os.PathError).Err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be:
unwrapped := err.(*os.PathError).Err | |
unwrapped := err.(*os.LinkError).Err |
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 <art27@cantab.net>
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 <art27@cantab.net>
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 <art27@cantab.net>
@onlygecko for the avoidance of future problems could you please test #16463? https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe is a windows build of 1.14 with #16463 compiled in. (Once it uploads to my server of course.) https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe.asc is the gpg signature signed by my key if you want to assert that this from me. |
I will test it on Monday as soon as I'm back at the office. Thanks for all the work you do and the quick responses. Have a great weekend. :-)
Am 16. Juli 2021 15:39:23 MESZ schrieb zeripath ***@***.***>:
***@***.*** for the avoidance of future problems could you please test
…
#16463?
https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe
is a windows build of 1.14 with #16463 compiled in. (Once it uploads to
my server of course.)
https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe.asc
is the gpg signature signed by my key if you want to assert that this
from me.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#16439 (comment)
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
|
Unfortunately this doesn't appear to be enough... So let's try #16481 instead: https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-windows-4.0-amd64.zip which contains a build of 1.14 with the above PR and it's gpg signature. |
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 <art27@cantab.net>
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 art27@cantab.net
Co-authored-by: techknowlogick techknowlogick@gitea.io