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

Method clear

fdbserver/KeyValueStoreSQLite.actor.cpp:904–915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902 remove();
903 }
904 void clear(KeyRangeRef keys) {
905 // TODO: This is really slow!
906 while (true) {
907 int r = moveTo(keys.begin);
908 if (r < 0)
909 moveNext();
910 if (!valid || (db.fragment_values ? decodeKVFragment(getEncodedRow()).get().key
911 : decodeKV(getEncodedRow()).key) >= keys.end)
912 break;
913 remove();
914 }
915 }
916 void fastClear(KeyRangeRef keys, bool& freeTableEmpty) {
917 std::vector<int> clearBuffer(SERVER_KNOBS->CLEAR_BUFFER_SIZE);
918 clearBuffer[0] = 0;

Callers

nothing calls this directly

Calls 6

moveToFunction · 0.85
moveNextFunction · 0.85
decodeKVFragmentFunction · 0.85
decodeKVFunction · 0.85
removeFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected