MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / isVisibleNoLock

Method isVisibleNoLock

src/storage/table/node_table.cpp:795–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793}
794
795bool NodeTable::isVisibleNoLock(const Transaction* transaction, offset_t offset) const {
796 if (transaction && transaction->isUnCommitted(tableID, offset)) {
797 const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID);
798 DASSERT(localTable);
799 return localTable->cast<LocalNodeTable>().isVisible(transaction, offset);
800 }
801 auto [nodeGroupIdx, offsetInGroup] = StorageUtils::getNodeGroupIdxAndOffsetInChunk(offset);
802 if (nodeGroupIdx >= nodeGroups->getNumNodeGroupsNoLock()) {
803 return false;
804 }
805 const auto* nodeGroup = getNodeGroupNoLock(nodeGroupIdx);
806 return nodeGroup->isVisibleNoLock(transaction, offsetInGroup);
807}
808
809PrimaryKeyIndex* NodeTable::tryGetPKIndex() const {
810 const auto index = getIndex(PrimaryKeyIndex::DEFAULT_NAME);

Callers

nothing calls this directly

Calls 5

getNodeGroupNoLockFunction · 0.85
isUnCommittedMethod · 0.80
getLocalTableMethod · 0.80
isVisibleMethod · 0.45

Tested by

no test coverage detected