Skip to content

Commit

Permalink
fix(server): Fix transaction bug
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
  • Loading branch information
dranikpg committed Feb 13, 2023
1 parent e7a5d58 commit 709839b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class Transaction {
// Iterate over shards and run function accepting (PerShardData&, ShardId) on all active ones.
template <typename F> void IterateActiveShards(F&& f) {
bool is_global = IsGlobal();
if (unique_shard_cnt_ == 1) {
if (!is_global && unique_shard_cnt_ == 1) {
auto i = unique_shard_id_;
f(shard_data_[SidToId(i)], i);
} else {
Expand Down

0 comments on commit 709839b

Please sign in to comment.