MCPcopy Create free account
hub / github.com/apple/foundationdb / lazyDelete

Method lazyDelete

fdbserver/KeyValueStoreSQLite.actor.cpp:954–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952 }
953 }
954 int lazyDelete(int desiredPages) {
955 std::vector<int> clearBuffer(SERVER_KNOBS->CLEAR_BUFFER_SIZE);
956 clearBuffer[0] = 0;
957
958 IntKeyCursor fc(db, db.freetable, true);
959 int pagesDeleted = 0;
960 db.checkError(
961 "BtreeLazyDelete",
962 sqlite3BtreeLazyDelete(
963 fc.cursor, &clearBuffer[0], &clearBuffer[0] + clearBuffer.size(), desiredPages, &pagesDeleted));
964 return pagesDeleted;
965 }
966
967 // Reads and reconstitutes kv fragments given cursor, an arena to allocate in, and a direction to move the cursor.
968 // getNext() returns the next KV pair, if there is one

Callers 2

checkFreePagesFunction · 0.80
actionFunction · 0.80

Calls 3

sqlite3BtreeLazyDeleteFunction · 0.85
checkErrorMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected