This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit c79560adb09b26da0037f3e018c0154fadf2105c Author: Alexey Serbin <ale...@apache.org> AuthorDate: Tue Apr 6 00:55:52 2021 -0700 [client] fix setting LookupRpcById's fields LookupRpcById::SendRpc() might be called again if retrying the call, so the parameters for the request should be set only once. This patch moves setting the relevant fields of GetTabletLocationsRequestPB into the LookupRpcById's constructor to avoid duplicates in the GetTabletLocationsRequestPB::tablet_ids field upon retrying the RPC. Change-Id: I0eacbc67db5ce1ff32a4aff80150a6152b205f23 Reviewed-on: http://gerrit.cloudera.org:8080/17274 Tested-by: Alexey Serbin <aser...@cloudera.com> Reviewed-by: Andrew Wong <aw...@cloudera.com> --- src/kudu/client/meta_cache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kudu/client/meta_cache.cc b/src/kudu/client/meta_cache.cc index 131795e..6f3d839 100644 --- a/src/kudu/client/meta_cache.cc +++ b/src/kudu/client/meta_cache.cc @@ -661,6 +661,8 @@ LookupRpcById::LookupRpcById(scoped_refptr<MetaCache> meta_cache, tablet_id_(tablet_id), meta_cache_(std::move(meta_cache)), remote_tablet_(remote_tablet) { + req_.add_tablet_ids(tablet_id_); + req_.set_intern_ts_infos_in_response(true); } void LookupRpcById::SendRpc() { @@ -675,8 +677,6 @@ void LookupRpcById::SendRpc() { } void LookupRpcById::SendRpcSlowPath() { - req_.add_tablet_ids(tablet_id_); - req_.set_intern_ts_infos_in_response(true); AsyncLeaderMasterRpc::SendRpc(); }