Skip to content

Commit

Permalink
feat: update rpc_holder (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong authored May 8, 2020
1 parent 5c3e19f commit 6127676
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/dsn/cpp/rpc_holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ class rpc_holder
rpc_holder(std::unique_ptr<TRequest> 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))
{
}

Expand Down Expand Up @@ -251,14 +252,14 @@ class rpc_holder
internal(std::unique_ptr<TRequest> &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<int>(timeout.count()), 0, partition_hash);
code, static_cast<int>(timeout.count()), thread_hash, partition_hash);
dsn_request->add_ref();
marshall(dsn_request, *thrift_request);
}
Expand Down

0 comments on commit 6127676

Please sign in to comment.