DescriptionAdded SafeRename to better handle problems with git processes locking directories.
This solves a problem with "os.rename" sometimes failing with an
exception after cloning a dependency to a temporary directory. It's
possible the dying git processes still hold a handle to the directory.
Since gclient delete the temporary directory regardless of the success
of the process, it results in a lot of GB downloaded for nothing.
SafeRename solves this by retrying a few times if the renaming fails,
sleeping one second every time to get other processes the time to
release their lock on the directory. It gives up retrying after 15 times.
BUG=
R=maruel@chromium.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=224372
Patch Set 1 #
Total comments: 6
Patch Set 2 : Fixing name and retry count. #Patch Set 3 : Fixing comment formatting. #
Messages
Total messages: 6 (0 generated)
|