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
The following commit(s) were added to refs/heads/master by this push:
new b53d088 [service_pool] show service name for a service pool
b53d088 is described below
commit b53d088d9ad22491ee638a815e7b22e550c4b56f
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri May 8 13:02:22 2020 -0700
[service_pool] show service name for a service pool
This patch adds name of the service to the thread pool that handles
corresponding RPC requests.
This helps to tell apart different threads at the '/threadz' page of
the embedded web UI for kudu-masters and kudu-tserver processes.
Change-Id: I8d35de60926f0b9637f94e36e4d38828266fe805
Reviewed-on: http://gerrit.cloudera.org:8080/15890
Reviewed-by: Andrew Wong <[email protected]>
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <[email protected]>
---
src/kudu/rpc/service_pool.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/kudu/rpc/service_pool.cc b/src/kudu/rpc/service_pool.cc
index 57643b1..0e7d5b8 100644
--- a/src/kudu/rpc/service_pool.cc
+++ b/src/kudu/rpc/service_pool.cc
@@ -89,8 +89,10 @@ ServicePool::~ServicePool() {
Status ServicePool::Init(int num_threads) {
for (int i = 0; i < num_threads; i++) {
scoped_refptr<kudu::Thread> new_thread;
- CHECK_OK(kudu::Thread::Create("service pool", "rpc worker",
- [this]() { this->RunThread(); },
&new_thread));
+ CHECK_OK(kudu::Thread::Create(
+ Substitute("service pool $0", service_->service_name()),
+ "rpc worker",
+ [this]() { this->RunThread(); }, &new_thread));
threads_.push_back(new_thread);
}
return Status::OK();