commit | 14651cd86b6fc1d48f56a208a9b5278b3e2dcf75 | [log] [tgz] |
---|---|---|
author | Artem Zinnatullin <ceo@artemzin.com> | Mon Aug 05 09:32:19 2019 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Aug 05 09:33:15 2019 -0700 |
tree | bbddc157b92de8cc717a177055d0e3ce833c002b | |
parent | 05c967ffa680ea1a2dd1d28834fbf75f9048f8d3 [diff] |
Fallback to next urls if download fails in HttpDownloader Fixes #8974. `HttpDownloader` never retried `IOException` that could have occurred during `ByteStreams.copy(payload, out)`, HttpConnector would have retried connection phase errors but not payload ones. This chageset adds fallback to next url(s) if present for both payload read errors and connection errors and adds (completely) missing tests for `HttpDownloader`. Note, that this PR technically disables questionable `HttpConnectorMultiplexer` optimization that attempts to connect to multiple urls at the same time (by starting threads that race with each other) and picking the one that connected faster. There is a way to keep that optimization while falling back to next urls, but it would require all exceptions to contain url that caused it so that `HttpDownloader` could retry download on other urls. I think making `HttpDownloader` more reliable and actually using provided `urls` as fallback is much more important than mentioned optimization. Closes #9015. PiperOrigin-RevId: 261702678
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel only rebuilds what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md
Bazel is released in ‘Beta’. See the product roadmap to learn about the path toward a stable 1.0 release.