Skip to content

Commit

Permalink
fix(server): Change WaitForCallbacks mem order (#914)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
  • Loading branch information
dranikpg authored Mar 6, 2023
1 parent 1fc7ef5 commit 64e10f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/server/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,7 @@ class Transaction {
void WaitForShardCallbacks() {
run_ec_.await([this] { return 0 == run_count_.load(std::memory_order_relaxed); });

// store operations below can not be ordered above the fence
std::atomic_thread_fence(std::memory_order_release);
seqlock_.fetch_add(1, std::memory_order_relaxed);
seqlock_.fetch_add(1, std::memory_order_acq_rel);
}

// Log command in shard's journal, if this is a write command with auto-journaling enabled.
Expand Down

0 comments on commit 64e10f0

Please sign in to comment.