Maintenance: Check Stopping before reacting to error code#1064
Merged
derrickstolee merged 1 commit intomicrosoft:masterfrom Apr 24, 2019
Merged
Maintenance: Check Stopping before reacting to error code#1064derrickstolee merged 1 commit intomicrosoft:masterfrom
derrickstolee merged 1 commit intomicrosoft:masterfrom
Conversation
When someone unmounts, it triggers a Stop() on the maintenance step that is currently running. This can interrupt longer-running Git commands more often than other actions, so check Stopping before checking the error code for a response.
jeschu1
approved these changes
Apr 24, 2019
derrickstolee
added a commit
that referenced
this pull request
Apr 26, 2019
…Git is running The GitMaintenanceStep throws a StoppingException if the RunGitCommand() method is run after a Stop() call. However, it doesn't throw when the Stop() call happens during the Git process. This requires extra handling of the Stopping boolean after receiving a response from RunGitCommand(). Such extra handling was added in #1064, but would not be necessary with this change. The better thing to do is to throw the StoppingException after the Git process completes. Add a unit test that verifies we automatically skip the remainder of a PerformMaintenance() method in a subclass. Looking through the error logs, all logged instances of a failure during 'commit-graph verify' or 'multi-pack-index verify' are actually due to this issue. Otherwise we would see errors from GitMaintenanceStep saying "Git process {command} failed with errors:" and those messages do no appear in the logs.
This file contains hidden or 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
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When someone unmounts, it triggers a Stop() on the maintenance
step that is currently running. This can interrupt longer-running Git
commands more often than other actions, so check Stopping before
checking the error code for a response.
This is more likely a reason for people to hit this error than any
data-shape issues that we were expecting to cause a problem.
While I am updating the check around the
commit-graph verifycommand, I am not un-commenting it as we don't have the full
fix for the "too many pack-files" case.