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

Method updateLastPageOnDisk

src/storage/disk_array.cpp:58–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void DiskArrayInternal::updateLastPageOnDisk() {
59 auto numElements = getNumElementsNoLock(TransactionType::READ_ONLY);
60 if (numElements > 0) {
61 auto apCursor = getAPIdxAndOffsetInAP(storageInfo, numElements - 1);
62 lastPageOnDisk = getAPPageIdxNoLock(apCursor.pageIdx, TransactionType::READ_ONLY);
63 } else {
64 lastPageOnDisk = 0;
65 }
66}
67
68uint64_t DiskArrayInternal::getNumElements(TransactionType trxType) {
69 std::shared_lock sLck{diskArraySharedMtx};

Callers

nothing calls this directly

Calls 1

getAPIdxAndOffsetInAPFunction · 0.85

Tested by

no test coverage detected