MySQL 8.0.40
Source Code Documentation
|
A RAII helper which latches the mutex protecting given shard during constructor, and unlatches it during destruction. More...
#include <lock0guards.h>
Public Member Functions | |
Shard_naked_latch_guard (ut::Location location, const table_id_t &table_id) | |
Shard_naked_latch_guard (ut::Location location, const page_id_t &page_id) | |
Shard_naked_latch_guard (ut::Location location, hash_table_t *hash_table, uint64_t cell_id) | |
~Shard_naked_latch_guard () | |
Private Member Functions | |
Shard_naked_latch_guard (ut::Location location, Lock_mutex &shard_mutex) | |
Private Member Functions inherited from ut::Non_copyable | |
Non_copyable (const Non_copyable &)=delete | |
Non_copyable & | operator= (const Non_copyable &)=delete |
Non_copyable ()=default | |
~Non_copyable ()=default | |
Private Attributes | |
Lock_mutex & | m_shard_mutex |
The mutex protecting the shard requested in constructor. More... | |
A RAII helper which latches the mutex protecting given shard during constructor, and unlatches it during destruction.
You quite probably don't want to use this class, which only takes a shard's latch, without acquiring global_latch - which gives no protection from threads which latch only the global_latch exclusively to prevent any activity. You should use it in combination with Global_shared_latch_guard, so that you first obtain an s-latch on the global_latch, or simply use the Shard_latch_guard class which already combines the two for you.
|
explicitprivate |
|
explicit |
|
explicit |
|
explicit |
locksys::Shard_naked_latch_guard::~Shard_naked_latch_guard | ( | ) |
|
private |
The mutex protecting the shard requested in constructor.