Tim Armstrong 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; : } : } > I guess I wanted to say that even if those will result in separate lines if I looked into how the LOG macro is implemented and it looks like you're right - the destructor of the LogMessage object is what flushes the log message and that will only run after Dump() returns. So this makes sense to me. https://github.com/google/glog/blob/58d7f873dcde8cf0fe6f37817643a7ff4e49e6d4/src/logging.cc#L1457 -- 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: Tue, 11 Feb 2020 00:12:26 +0000 Gerrit-HasComments: Yes
