#include <namespace_uuid_cache.h>
◆ CollectionUUIDMap
◆ NamespaceUUIDCache()
mongo::NamespaceUUIDCache::NamespaceUUIDCache |
( |
| ) |
|
|
default |
◆ ensureNamespaceInCache()
void mongo::NamespaceUUIDCache::ensureNamespaceInCache |
( |
const NamespaceString & |
nss, |
|
|
CollectionUUID |
uuid |
|
) |
| |
This function adds the pair nss.ns(), uuid to the namespace UUID cache if it does not yet exist.
If nss.ns() already exists in the cache with a different UUID, a AssertionException is thrown, so we can guarantee that an operation will always resolve the same name to the same collection, even in presence of drops and renames.
◆ evictNamespace()
void mongo::NamespaceUUIDCache::evictNamespace |
( |
const NamespaceString & |
nss | ) |
|
This function removes the entry for nss.ns() from the namespace UUID cache.
Does nothing if the entry doesn't exist. It is called via the op observer when a collection is dropped or renamed.
◆ evictNamespacesInDatabase()
void mongo::NamespaceUUIDCache::evictNamespacesInDatabase |
( |
StringData |
dbname | ) |
|
Same as above, but for all registered namespaces in the given dbname.
◆ MONGO_DISALLOW_COPYING()
◆ verifyNotCached()
void mongo::NamespaceUUIDCache::verifyNotCached |
( |
const NamespaceString & |
nss, |
|
|
CollectionUUID |
uuid |
|
) |
| |
|
inline |
For testing only: verify that 'nss' is not cached.
◆ _cache
◆ get
Initial value:=
OperationContext::declareDecoration<NamespaceUUIDCache>()
The documentation for this class was generated from the following files: