From 3877f97b23f3fa107338c005e20c0c1adc92e77e Mon Sep 17 00:00:00 2001 From: gaschler Date: Fri, 10 Aug 2018 09:30:54 +0200 Subject: [PATCH] Bump async_grpc (#1380) Specify timeouts where RetryStrategy is used. --- bazel/repositories.bzl | 4 ++-- cartographer/cloud/client/map_builder_stub.cc | 5 +++-- cartographer/cloud/internal/local_trajectory_uploader.cc | 2 +- scripts/install_async_grpc.sh | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index c9ee6bd..d554a40 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -228,9 +228,9 @@ def cartographer_repositories(): _maybe(native.http_archive, name = "com_github_googlecartographer_async_grpc", - strip_prefix = "async_grpc-ed8e3b31bdd46a74f0c47b4c53a47e0c0f21141b", + strip_prefix = "async_grpc-771af45374af7f7bfc3b622ed7efbe29a4aba403", urls = [ - "https://github.com/googlecartographer/async_grpc/archive/ed8e3b31bdd46a74f0c47b4c53a47e0c0f21141b.tar.gz", + "https://github.com/googlecartographer/async_grpc/archive/771af45374af7f7bfc3b622ed7efbe29a4aba403.tar.gz", ], ) _maybe(native.http_archive, diff --git a/cartographer/cloud/client/map_builder_stub.cc b/cartographer/cloud/client/map_builder_stub.cc index 37b0907..2c85e26 100644 --- a/cartographer/cloud/client/map_builder_stub.cc +++ b/cartographer/cloud/client/map_builder_stub.cc @@ -66,8 +66,9 @@ int MapBuilderStub::AddTrajectoryBuilder( *request.add_expected_sensor_ids() = cloud::ToProto(sensor_id); } async_grpc::Client client( - client_channel_, async_grpc::CreateLimitedBackoffStrategy( - common::FromMilliseconds(100), 2.f, 5)); + client_channel_, common::FromSeconds(10), + async_grpc::CreateLimitedBackoffStrategy(common::FromMilliseconds(100), + 2.f, 5)); CHECK(client.Write(request)); // Construct trajectory builder stub. diff --git a/cartographer/cloud/internal/local_trajectory_uploader.cc b/cartographer/cloud/internal/local_trajectory_uploader.cc index 5608d1e..bfffa9a 100644 --- a/cartographer/cloud/internal/local_trajectory_uploader.cc +++ b/cartographer/cloud/internal/local_trajectory_uploader.cc @@ -205,7 +205,7 @@ void LocalTrajectoryUploader::ProcessSendQueue() { if (batch_request.sensor_data_size() == batch_size_) { async_grpc::Client client( - client_channel_, + client_channel_, common::FromSeconds(10), async_grpc::CreateUnlimitedConstantDelayStrategy( common::FromSeconds(1), kUnrecoverableStatusCodes)); if (client.Write(batch_request)) { diff --git a/scripts/install_async_grpc.sh b/scripts/install_async_grpc.sh index b4412e6..95ac847 100755 --- a/scripts/install_async_grpc.sh +++ b/scripts/install_async_grpc.sh @@ -19,7 +19,7 @@ set -o verbose git clone https://github.com/googlecartographer/async_grpc cd async_grpc -git checkout ed8e3b31bdd46a74f0c47b4c53a47e0c0f21141b +git checkout 771af45374af7f7bfc3b622ed7efbe29a4aba403 mkdir build cd build cmake -G Ninja \