commit | 85922f2fa761c6e0c3a2a97ad81268871bb11187 | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Thu Jun 13 19:03:50 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jun 13 19:03:50 2019 |
tree | 0c8b05f825aae5ceff37f52da6a1d71945fae470 | |
parent | 2b22351bdbfc53eaf0105a1c65dbc8ae5723333e [diff] |
[cipd] Make FileSystem.Replace more concurrency friendly. Document its behavior better, add a test for concurrency edge cases. Also slightly improve performance of replacing an empty directory: some time ago os.Rename(...) changed to error out when 'newpath' is an empty directory. This triggered a slower code path (moving to trash, cleaning up thrash). Now we try to simply os.Remove(...) the file before moving it to trash. Finally, do minor nit cleanups in logging and tests. R=tandrii@chromium.org BUG=972203 Change-Id: I95f2c5e1201f0cc9c323bca5171afb1fd5f9cddb Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/1650497 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
Contributing uses the same flow as Chromium contributions.