mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
tc_contention_warning_reported transition to std::atomic
This commit is contained in:
@ -57,7 +57,7 @@ ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
|
|||||||
ulong tc_size; /**< Table cache threshold for LRU eviction. */
|
ulong tc_size; /**< Table cache threshold for LRU eviction. */
|
||||||
uint32 tc_instances;
|
uint32 tc_instances;
|
||||||
uint32 tc_active_instances= 1;
|
uint32 tc_active_instances= 1;
|
||||||
static uint32 tc_contention_warning_reported;
|
static std::atomic<bool> tc_contention_warning_reported;
|
||||||
|
|
||||||
/** Data collections. */
|
/** Data collections. */
|
||||||
static LF_HASH tdc_hash; /**< Collection of TABLE_SHARE objects. */
|
static LF_HASH tdc_hash; /**< Collection of TABLE_SHARE objects. */
|
||||||
@ -187,8 +187,8 @@ struct Table_cache_instance
|
|||||||
n_instances + 1);
|
n_instances + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!my_atomic_fas32_explicit((int32*) &tc_contention_warning_reported,
|
else if (!tc_contention_warning_reported.exchange(true,
|
||||||
1, MY_MEMORY_ORDER_RELAXED))
|
std::memory_order_relaxed))
|
||||||
{
|
{
|
||||||
sql_print_warning("Detected table cache mutex contention at instance %d: "
|
sql_print_warning("Detected table cache mutex contention at instance %d: "
|
||||||
"%d%% waits. Additional table cache instance "
|
"%d%% waits. Additional table cache instance "
|
||||||
|
Reference in New Issue
Block a user