From 61276761142b9d5c25e9417fc2b4a2247005209e Mon Sep 17 00:00:00 2001 From: HeYuchen <377710264@qq.com> Date: Fri, 8 May 2020 16:22:04 +0800 Subject: [PATCH] feat: update rpc_holder (#456) --- include/dsn/cpp/rpc_holder.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/dsn/cpp/rpc_holder.h b/include/dsn/cpp/rpc_holder.h index ecca7e5cc3..a32fe3dd8c 100644 --- a/include/dsn/cpp/rpc_holder.h +++ b/include/dsn/cpp/rpc_holder.h @@ -89,8 +89,9 @@ class rpc_holder rpc_holder(std::unique_ptr req, task_code code, std::chrono::milliseconds timeout = 0_ms, - uint64_t partition_hash = 0) - : _i(new internal(req, code, timeout, partition_hash)) + uint64_t partition_hash = 0, + int thread_hash = 0) + : _i(new internal(req, code, timeout, partition_hash, thread_hash)) { } @@ -251,14 +252,14 @@ class rpc_holder internal(std::unique_ptr &req, task_code code, std::chrono::milliseconds timeout, - uint64_t partition_hash) + uint64_t partition_hash, + int thread_hash) : thrift_request(std::move(req)), auto_reply(false) { dassert(thrift_request != nullptr, "req should not be null"); - // leave thread_hash to 0 dsn_request = message_ex::create_request( - code, static_cast(timeout.count()), 0, partition_hash); + code, static_cast(timeout.count()), thread_hash, partition_hash); dsn_request->add_ref(); marshall(dsn_request, *thrift_request); }