OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lockmgr::InsertDataLockMgr Class Reference

Prevents simultaneous inserts into the same table. To allow concurrent Insert/Select queries, Insert queries only obtain a write lock on table data when checkpointing (flushing chunks to disk). Inserts/Data load will take an exclusive (write) lock to ensure only one insert proceeds on each table at a time. More...

#include <LockMgr.h>

+ Inheritance diagram for lockmgr::InsertDataLockMgr:
+ Collaboration diagram for lockmgr::InsertDataLockMgr:

Static Public Member Functions

static InsertDataLockMgrinstance ()
 
- Static Public Member Functions inherited from lockmgr::TableLockMgrImpl< InsertDataLockMgr >
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

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

Additional Inherited Members

- Public Member Functions inherited from lockmgr::TableLockMgrImpl< InsertDataLockMgr >
MutexTypegetTableMutex (const ChunkKey table_key)
 
std::set< ChunkKeygetLockedTables () const
 
- Protected Attributes inherited from lockmgr::TableLockMgrImpl< InsertDataLockMgr >
std::mutex map_mutex_
 
std::map< ChunkKey,
std::unique_ptr< MutexType > > 
table_mutex_map_
 

Detailed Description

Prevents simultaneous inserts into the same table. To allow concurrent Insert/Select queries, Insert queries only obtain a write lock on table data when checkpointing (flushing chunks to disk). Inserts/Data load will take an exclusive (write) lock to ensure only one insert proceeds on each table at a time.

Definition at line 55 of file LockMgr.h.

Constructor & Destructor Documentation

lockmgr::InsertDataLockMgr::InsertDataLockMgr ( )
inlineprotected

Definition at line 63 of file LockMgr.h.

63 {}

Member Function Documentation

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

Definition at line 57 of file LockMgr.h.

57  {
58  static InsertDataLockMgr insert_data_lock_mgr;
59  return insert_data_lock_mgr;
60  }

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