Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15197 )

Change subject: KUDU-2996: trace when rpc_duration_too_long_ms exceeded
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15197/3/src/kudu/rpc/rpcz_store.cc
File src/kudu/rpc/rpcz_store.cc:

http://gerrit.cloudera.org:8080/#/c/15197/3/src/kudu/rpc/rpcz_store.cc@266
PS3, Line 266:   if (PREDICT_FALSE(FLAGS_rpc_dump_all_traces)) {
             :     LOG(INFO) << call->ToString() << " took " << duration_ms << 
"ms. Trace:";
             :     call->trace()->Dump(&LOG(INFO), true);
             :   } else if (duration_ms > FLAGS_rpc_duration_too_long_ms) {
             :     LOG(INFO) << call->ToString() << " took " << duration_ms << 
"ms.";
             :     string s = call->trace()->DumpToString();
             :     if (!s.empty()) {
             :       LOG(INFO) << "Trace:\n" << s;
             :     }
             :   }
Only in PS3 I realized the code under those 2 conditional scopes might be 
unified, something like below:

  if (duration_ms > FLAGS_rpc_duration_too_long_ms ||           
      PREDICT_FALSE(FLAGS_rpc_dump_all_traces)) {         
    const auto flags = (duration_ms > FLAGS_rpc_duration_too_long_ms)
        ? INCLUDE_ALL : INCLUDE_TIME_DELTAS;
    LOG(INFO) << call->ToString() << " took " << duration_ms << "ms. Trace:";
    call->trace()->Dump(&LOG(INFO), flags);
  }

?



--
To view, visit http://gerrit.cloudera.org:8080/15197
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I20d9b5e318f4a987051f1f7c2cd5b1d92c61bd05
Gerrit-Change-Number: 15197
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Comment-Date: Mon, 10 Feb 2020 20:10:34 +0000
Gerrit-HasComments: Yes

Reply via email to