OmniSciDB
a5dc49c757
|
Locks protecting table data. Read queries take a read lock, while write queries (update, delete) obtain a write lock. Note that insert queries do not currently take a write lock (to allow concurrent inserts). Instead, insert queries obtain a write lock on the table metadata to allow existing read queries to finish (and block new ones) before flushing the inserted data to disk. More...
#include <LockMgr.h>
Static Public Member Functions | |
static TableDataLockMgr & | instance () |
Static Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr > | |
static TableDataLockMgr & | instance () |
static WriteLock | getWriteLockForTable (const Catalog_Namespace::Catalog &cat, const std::string &table_name) |
static WriteLock | getWriteLockForTable (const ChunkKey &table_key) |
static ReadLock | getReadLockForTable (Catalog_Namespace::Catalog &cat, const std::string &table_name) |
static ReadLock | getReadLockForTable (const ChunkKey &table_key) |
Static Protected Attributes | |
static constexpr std::string_view | kind = "data" |
Friends | |
class | TableLockMgrImpl< TableDataLockMgr > |
Additional Inherited Members | |
Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr > | |
virtual | ~TableLockMgrImpl ()=default |
virtual MutexTracker * | getTableMutex (const ChunkKey &table_key) |
std::set< ChunkKey > | getLockedTables () const |
Protected Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr > | |
TableLockMgrImpl () | |
virtual std::unique_ptr < heavyai::DistributedSharedMutex > | getClusterTableMutex (const ChunkKey &table_key) const |
Protected Attributes inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr > | |
std::mutex | map_mutex_ |
std::map< ChunkKey, std::unique_ptr< MutexTracker > > | table_mutex_map_ |
Locks protecting table data. Read queries take a read lock, while write queries (update, delete) obtain a write lock. Note that insert queries do not currently take a write lock (to allow concurrent inserts). Instead, insert queries obtain a write lock on the table metadata to allow existing read queries to finish (and block new ones) before flushing the inserted data to disk.
|
inlinestatic |
Definition at line 78 of file LockMgr.h.
Referenced by DBHandler::execute_rel_alg(), and DBHandler::sql_execute().
|
friend |
|
inlinestaticprotected |
Definition at line 85 of file LockMgr.h.
Referenced by TableFunctionsFactory_linker.BaseGenerateFiles::_get_filename(), heavydb.serialized_result_set.ttypes.TTargetInfo::read(), and heavydb.serialized_result_set.ttypes.TTargetInfo::write().