mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore(server): pass coordinator thread to a transaction object (#905)
This should help with some of the optimizations we may do in the future. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
c9e9311c8e
commit
8cf8115116
8 changed files with 21 additions and 11 deletions
|
@ -41,7 +41,8 @@ IntentLock::Mode Transaction::Mode() const {
|
|||
* @param ess
|
||||
* @param cs
|
||||
*/
|
||||
Transaction::Transaction(const CommandId* cid) : cid_{cid} {
|
||||
Transaction::Transaction(const CommandId* cid, uint32_t thread_index)
|
||||
: cid_{cid}, coordinator_index_(thread_index) {
|
||||
string_view cmd_name(cid_->name());
|
||||
if (cmd_name == "EXEC" || cmd_name == "EVAL" || cmd_name == "EVALSHA") {
|
||||
multi_.reset(new MultiData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue