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

Function checkFreePages

fdbserver/KeyValueStoreSQLite.actor.cpp:1897–1913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1895 readThreads[i].clear();
1896 }
1897 void checkFreePages() {
1898 int iterations = 0;
1899
1900 int64_t freeListSize = freeListPages;
1901 while (!freeTableEmpty && freeListSize < SERVER_KNOBS->CHECK_FREE_PAGE_AMOUNT) {
1902 int deletedPages = cursor->lazyDelete(SERVER_KNOBS->CHECK_FREE_PAGE_AMOUNT);
1903 freeTableEmpty = (deletedPages != SERVER_KNOBS->CHECK_FREE_PAGE_AMOUNT);
1904 springCleaningStats.lazyDeletePages += deletedPages;
1905 ++iterations;
1906
1907 freeListSize = conn.freePages();
1908 }
1909
1910 freeListPages = freeListSize;
1911 // if (iterations) printf("Lazy free: %d pages on freelist, %d iterations, freeTableEmpty=%d\n",
1912 // freeListPages, iterationsi, freeTableEmpty);
1913 }
1914
1915 struct SpringCleaningAction final : TypedAction<Writer, SpringCleaningAction>,
1916 FastAllocated<SpringCleaningAction> {

Callers 1

actionFunction · 0.85

Calls 2

lazyDeleteMethod · 0.80
freePagesMethod · 0.80

Tested by

no test coverage detected