OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 WriteLock getWriteLockForTable (const Catalog_Namespace::Catalog &cat, const std::string &table_name)
 
static WriteLock getWriteLockForTable (const ChunkKey table_key)
 
static ReadLock getReadLockForTable (const Catalog_Namespace::Catalog &cat, const std::string &table_name)
 
static ReadLock getReadLockForTable (const ChunkKey table_key)
 

Protected Member Functions

 TableDataLockMgr ()
 
- Protected Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
 TableLockMgrImpl ()
 

Additional Inherited Members

- Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
MutexTypegetTableMutex (const ChunkKey table_key)
 
std::set< ChunkKeygetLockedTables () const
 
- Protected Attributes inherited from lockmgr::TableLockMgrImpl< TableDataLockMgr >
std::mutex map_mutex_
 
std::map< ChunkKey,
std::unique_ptr< MutexType > > 
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 74 of file LockMgr.h.

Constructor & Destructor Documentation

lockmgr::TableDataLockMgr::TableDataLockMgr ( )
inlineprotected

Definition at line 82 of file LockMgr.h.

82 {}

Member Function Documentation

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

Definition at line 76 of file LockMgr.h.

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

76  {
77  static TableDataLockMgr data_lock_mgr;
78  return data_lock_mgr;
79  }

+ Here is the caller graph for this function:


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