mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
opt(server): Execute lua on target shard, if it's 1 (#1639)
* opt(server): Execute lua on target shard, if it's 1 This will save hops by short-circuiting execution of commands. * Reuse unique shard id from tx Only switch threads for LOCK_AHEAD * Signedness
This commit is contained in:
parent
6d84515e08
commit
734401098c
3 changed files with 18 additions and 3 deletions
|
@ -946,6 +946,11 @@ string_view Transaction::Name() const {
|
|||
return cid_->name();
|
||||
}
|
||||
|
||||
ShardId Transaction::GetUniqueShard() const {
|
||||
DCHECK_EQ(GetUniqueShardCnt(), 1U);
|
||||
return unique_shard_id_;
|
||||
}
|
||||
|
||||
KeyLockArgs Transaction::GetLockArgs(ShardId sid) const {
|
||||
KeyLockArgs res;
|
||||
res.db_index = db_index_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue