aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/pprof/BUILD
diff options
context:
space:
mode:
authorGravatar buchgr <buchgr@google.com>2018-07-25 05:40:42 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-25 05:42:57 -0700
commitbca1912853086b8e9a28a85a1b144ec0dc9717cc (patch)
treee8f4182af7428442078774612abd5c98b8827cd1 /third_party/pprof/BUILD
parent04eeca48ba5eac98118048de7447634d515fc102 (diff)
remote: fix race on download error. Fixes #5047
For downloading output files / directories we trigger all downloads concurrently and asynchronously in the background and after that wait for all downloads to finish. However, if a download failed we did not wait for the remaining downloads to finish but immediately started deleting partial downloads and continued with local execution of the action. That leads to two interesting bugs: * The cleanup procedure races with the downloads that are still in progress. As it tries to delete files and directories, new files and directories are created and that will often lead to "Directory not empty" errors as seen in #5047. * The clean up procedure does not detect the race, succeeds and subsequent local execution fails because not all files have been deleted. The solution is to always wait for all downloads to complete before entering the cleanup routine. Ideally we would also cancel all outstanding downloads, however, that's not as straightfoward as it seems. That is, the j.u.c.Future API does not provide a way to cancel a computation and also wait for that computation actually having determinated. So we'd need to introduce a separate mechanism to cancel downloads. RELNOTES: None PiperOrigin-RevId: 205980446
Diffstat (limited to 'third_party/pprof/BUILD')
0 files changed, 0 insertions, 0 deletions