bug(transaction): local result needs to be reset on InitByArgs Fixes … (#762)

* bug(transaction): local result needs to be reset on InitByArgs Fixes #752

Signed-off-by: adi_holden <adi@dragonflydb.io>

* add unit test

Signed-off-by: adi_holden <adi@dragonflydb.io>

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2023-02-06 15:48:12 +02:00 committed by GitHub
parent 448508a23a
commit 4a826fdb7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -82,6 +82,7 @@ Transaction::~Transaction() {
OpStatus Transaction::InitByArgs(DbIndex index, CmdArgList args) {
db_index_ = index;
cmd_with_full_args_ = args;
local_result_ = OpStatus::OK;
if (IsGlobal()) {
unique_shard_cnt_ = shard_set->size();