This is an automated email from the ASF dual-hosted git repository.

laiyingchun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit fdd373ab1be38f4eeb65360661ec039c5ab4a572
Author: xinghuayu007 <[email protected]>
AuthorDate: Tue May 23 11:15:16 2023 +0800

    [KUDU-3483] Log requestor info and request id for write interface
    
    Currently, it is hard to trace the whole process of inserting data.
    Write interface logs the data, but doesn't log the requestor information
    and client information.
    
    This patch logs the requestor information about downstream IP and
    client information about client id, sequence number for debuging.
    
    Change-Id: I0a3bacd947146fb52f94ab09dda94c96ed6d8ab8
    Reviewed-on: http://gerrit.cloudera.org:8080/19950
    Tested-by: Kudu Jenkins
    Reviewed-by: Yingchun Lai <[email protected]>
---
 src/kudu/tserver/tablet_service.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/kudu/tserver/tablet_service.cc 
b/src/kudu/tserver/tablet_service.cc
index bed57de7e..a7f50f6cb 100644
--- a/src/kudu/tserver/tablet_service.cc
+++ b/src/kudu/tserver/tablet_service.cc
@@ -1539,7 +1539,10 @@ void TabletServiceImpl::Write(const WriteRequestPB* req,
   const auto& tablet_id = req->tablet_id();
   TRACE_EVENT1("tserver", "TabletServiceImpl::Write",
                "tablet_id", tablet_id);
-  DVLOG(3) << "Received Write RPC: " << SecureDebugString(*req);
+  DVLOG(3) << Substitute("Received Write RPC: $0, requestor: $1, request id: 
$2",
+                        SecureDebugString(*req), context->requestor_string(),
+                        context->request_id() == nullptr ?
+                        "" : SecureDebugString(*context->request_id()));
   scoped_refptr<TabletReplica> replica;
   if (!LookupRunningTabletReplicaOrRespond(
         server_->tablet_manager(), tablet_id, resp, context, &replica)) {

Reply via email to