OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lockmgr::TableSchemaLockMgr Class Reference

Locks protecting a physical table object returned from the catalog. Table Metadata Locks prevent incompatible concurrent operations on table objects. For example, before dropping or altering a table, a metadata write lock must be acquired. This prevents concurrent read + drop, concurrent drops, etc. More...

#include <LockMgr.h>

+ Inheritance diagram for lockmgr::TableSchemaLockMgr:
+ Collaboration diagram for lockmgr::TableSchemaLockMgr:

Static Public Member Functions

static TableSchemaLockMgrinstance ()
 
- Static Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableSchemaLockMgr >
static TableSchemaLockMgrinstance ()
 
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 Private Attributes

static constexpr std::string_view kind = "schema"
 

Friends

class TableLockMgrImpl< TableSchemaLockMgr >
 

Additional Inherited Members

- Public Member Functions inherited from lockmgr::TableLockMgrImpl< TableSchemaLockMgr >
virtual ~TableLockMgrImpl ()=default
 
virtual MutexTrackergetTableMutex (const ChunkKey table_key)
 
std::set< ChunkKeygetLockedTables () const
 
- Protected Member Functions inherited from lockmgr::TableLockMgrImpl< TableSchemaLockMgr >
 TableLockMgrImpl ()
 
virtual std::unique_ptr
< heavyai::DistributedSharedMutex
getClusterTableMutex (const ChunkKey table_key)
 
- Protected Attributes inherited from lockmgr::TableLockMgrImpl< TableSchemaLockMgr >
std::mutex map_mutex_
 
std::map< ChunkKey,
std::unique_ptr< MutexTracker > > 
table_mutex_map_
 

Detailed Description

Locks protecting a physical table object returned from the catalog. Table Metadata Locks prevent incompatible concurrent operations on table objects. For example, before dropping or altering a table, a metadata write lock must be acquired. This prevents concurrent read + drop, concurrent drops, etc.

Definition at line 38 of file LockMgr.h.

Member Function Documentation

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

Definition at line 40 of file LockMgr.h.

Referenced by DBHandler::execute_rel_alg(), Catalog_Namespace::Catalog::reloadCatalogMetadataUnlocked(), and DBHandler::sql_execute().

40  {
41  static TableSchemaLockMgr table_lock_mgr;
42  return table_lock_mgr;
43  }

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TableLockMgrImpl< TableSchemaLockMgr >
friend

Definition at line 46 of file LockMgr.h.

Member Data Documentation

constexpr std::string_view lockmgr::TableSchemaLockMgr::kind = "schema"
inlinestaticprivate

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