Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ethomson
Copy link
Member

When using the do_with_retries macro for retrying filesystem operations in the posix emulation layer, allow the remediation function to return GIT_RETRY, meaning that the error was believed to be remediated, and the operation should be retried immediately, without a sleep.

Use this in the ensure_writable remediation function - if the function is able to set the file writable, then retry the operation immediately. This will prevent a 5ms sleep in the common case.

implausible added a commit to implausible/nodegit that referenced this pull request Jul 19, 2017
Carson Howard and others added 3 commits July 26, 2017 10:40
Fixed an issue where the retry logic on p_unlink sleeps before it tries setting a file to write mode causing unnecessary slowdown.
When using the `do_with_retries` macro for retrying filesystem
operations in the posix emulation layer, allow the remediation function
to return `GIT_RETRY`, meaning that the error was believed to be
remediated, and the operation should be retried immediately, without
a sleep.

This is a slightly more general solution to the problem fixed in #4312.
@ethomson ethomson force-pushed the ethomson/win32_remediate branch from 1af0c01 to bc35fd4 Compare July 26, 2017 09:41
@ethomson ethomson merged commit 20d3000 into master Jul 26, 2017
@ethomson
Copy link
Member Author

Thanks @cjhoward92 !

@ethomson ethomson deleted the ethomson/win32_remediate branch January 9, 2019 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant