OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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< T >
static T & instance ()
 
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 = "insert"
 

Friends

class TableLockMgrImpl< InsertDataLockMgr >
 

Additional Inherited Members

- Public Member Functions inherited from lockmgr::TableLockMgrImpl< T >
virtual ~TableLockMgrImpl ()=default
 
virtual MutexTrackergetTableMutex (const ChunkKey table_key)
 
std::set< ChunkKeygetLockedTables () const
 
- Protected Member Functions inherited from lockmgr::TableLockMgrImpl< T >
 TableLockMgrImpl ()
 
virtual std::unique_ptr
< heavyai::DistributedSharedMutex
getClusterTableMutex (const ChunkKey table_key)
 
- Protected Attributes inherited from lockmgr::TableLockMgrImpl< T >
std::mutex map_mutex_
 
std::map< ChunkKey,
std::unique_ptr< MutexTracker > > 
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 56 of file LockMgr.h.

Member Function Documentation

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

Definition at line 58 of file LockMgr.h.

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

Friends And Related Function Documentation

friend class TableLockMgrImpl< InsertDataLockMgr >
friend

Definition at line 64 of file LockMgr.h.

Member Data Documentation

constexpr std::string_view lockmgr::InsertDataLockMgr::kind = "insert"
inlinestaticprotected

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