Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

win32: provide fast-path for retrying filesystem operations#4311

Merged
ethomson merged 3 commits intomasterlibgit2/libgit2:masterfrom
ethomson/win32_remediatelibgit2/libgit2:ethomson/win32_remediateCopy head branch name to clipboard
Jul 26, 2017
Merged

win32: provide fast-path for retrying filesystem operations#4311
ethomson merged 3 commits intomasterlibgit2/libgit2:masterfrom
ethomson/win32_remediatelibgit2/libgit2:ethomson/win32_remediateCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.