Closed Bug 1287496 Opened 3 years ago Closed 3 years ago
alter the sleep timespan for delete retries in mozfile
58 bytes, text/x-review-board-request
in bug 1287258 we observed that delete retries have a better chance of success if the wait between retries is incrementally increased on subsequent tries. alter the behaviour of mozfile.remove() so that retry timespans are varied.
Review commit: https://reviewboard.mozilla.org/r/64976/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/64976/
Attachment #8772050 - Flags: review?(ted)
Comment on attachment 8772050 [details] Bug 1287496 - increment sleep timespan by (attempts * delay) seconds; https://reviewboard.mozilla.org/r/64976/#review62602 ::: testing/mozbase/mozfile/mozfile/mozfile.py:165 (Diff revision 1) > > retry_count += 1 > > print '%s() failed for "%s". Reason: %s (%s). Retrying...' % \ > (func.__name__, args, e.strerror, e.errno) > - time.sleep(retry_delay) > + time.sleep(retry_count * retry_delay) This is fine, but it might be more flexible if you replaced this loop with code that uses `redo`, which we have in-tree: https://dxr.mozilla.org/mozilla-central/source/python/redo/redo/__init__.py A couple of examples: https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/build/upload.py#100 https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/toolkit/crashreporter/tools/upload_symbols.py#72 If you do that you will also have to add redo to mozfile's `install_requires` here, for when it gets published as a pypi package: https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/testing/mozbase/mozfile/setup.py#23
Attachment #8772050 - Flags: review?(ted) → review+
since we're pressed to land this and i don't feel confident today about how to do the redo refactor/implementation, i've raised bug: 1288201 to track the redo work.
Pushed by email@example.com: https://hg.mozilla.org/integration/fx-team/rev/563d7aa9dab4 Increment sleep timespan by (attempts * delay) seconds. r=ted
You need to log in before you can comment on or make changes to this bug.