OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lockmgr::TableDataLockMgr Class Reference

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>

+ Inheritance diagram for lockmgr::TableDataLockMgr:
+ Collaboration diagram for lockmgr::TableDataLockMgr:

Static Public Member Functions

static TableDataLockMgrinstance ()
 
- Static Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
static TableDataLockMgrinstance ()
 
static WriteLock getWriteLockForTable (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 MutexTrackergetTableMutex (const ChunkKey table_key)
 
std::set< ChunkKeygetLockedTables () const
 
- Protected Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
 TableLockMgrImpl ()
 
virtual std::unique_ptr
< heavyai::DistributedSharedMutex
getClusterTableMutex (const ChunkKey table_key)
 
- Protected Attributes inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
std::mutex map_mutex_
 
std::map< ChunkKey,
std::unique_ptr< MutexTracker > > 
table_mutex_map_
 

Detailed Description

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.

Definition at line 76 of file LockMgr.h.

Member Function Documentation

static TableDataLockMgr& lockmgr::TableDataLockMgr::instance ( )
inlinestatic

Definition at line 78 of file LockMgr.h.

Referenced by DBHandler::execute_rel_alg(), and DBHandler::sql_execute().

78  {
79  static TableDataLockMgr data_lock_mgr;
80  return data_lock_mgr;
81  }

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TableLockMgrImpl< TableDataLockMgr >
friend

Definition at line 84 of file LockMgr.h.

Member Data Documentation

constexpr std::string_view lockmgr::TableDataLockMgr::kind = "data"
inlinestaticprotected

The documentation for this class was generated from the following file: