Commit 2fbf7514 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22456 after-merge fix: Avoid functional change to rw_lock_s_unlock()

In the merge 9e6e4355 we replaced
direct use of std::atomic with a wrapper class, so that
dict_index_t::lock will support the default assignment operator.

As part of that change, one occurrence of std::memory_order_release
was accidentally replaced with std::memory_order_relaxed.

Thanks to Sergey Vojtovich for noticing this.
parent 57f7b486
......@@ -355,7 +355,8 @@ rw_lock_s_unlock_func(
ut_d(rw_lock_remove_debug_info(lock, pass, RW_LOCK_S));
/* Increment lock_word to indicate 1 less reader */
int32_t lock_word = lock->lock_word.fetch_add(1);
int32_t lock_word = lock->lock_word.fetch_add(
1, std::memory_order_release);
if (lock_word == -1 || lock_word == -X_LOCK_HALF_DECR - 1) {
/* wait_ex waiter exists. It may not be asleep, but we signal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment