You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2020/07/30 06:30:33 UTC
[kudu] 03/03: master-test: reuse protobuf for response
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 1fd79720ed5e6d430784f2dce9ebd387acfc48f8
Author: Todd Lipcon <to...@lipcon.org>
AuthorDate: Wed Jul 29 15:08:43 2020 -0700
master-test: reuse protobuf for response
Similar to commit e77733ef37e981a9e1b1d2787868ed08b87e2603, this changes
the benchmark client to reuse protobufs and therefore increase
throughput. Since the test is meant to test the master's throughput, we
should optimize the client side as much as possible even if the real
implementation doesn't use this optimization.
Change-Id: I865bf87cade25c784660f897849793fbe6d027df
Reviewed-on: http://gerrit.cloudera.org:8080/16255
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Tested-by: Alexey Serbin <as...@cloudera.com>
---
src/kudu/master/master-test.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/kudu/master/master-test.cc b/src/kudu/master/master-test.cc
index cc590a7..5b02797 100644
--- a/src/kudu/master/master-test.cc
+++ b/src/kudu/master/master-test.cc
@@ -1160,9 +1160,10 @@ TEST_P(ConcurrentGetTableSchemaTest, Rpc) {
auto table_name = Substitute(kTableNamePattern, idx);
GetTableSchemaRequestPB req;
req.mutable_table()->set_table_name(table_name);
+ GetTableSchemaResponsePB resp;
while (!done.Load()) {
RpcController controller;
- GetTableSchemaResponsePB resp;
+ resp.Clear();
CHECK_OK(proxies[idx]->GetTableSchema(req, &resp, &controller));
++call_counters[idx];
if (resp.has_error()) {