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

Method cleanup

fdbserver/TenantCache.actor.cpp:149–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149int TenantCache::cleanup() {
150 int tenantsRemoved = 0;
151 std::vector<Key> keysToErase;
152
153 for (auto& t : tenantCache) {
154 ASSERT(t.value->cacheGeneration() <= generation);
155 if (t.value->cacheGeneration() != generation) {
156 keysToErase.push_back(t.key);
157 }
158 }
159
160 for (auto& k : keysToErase) {
161 tenantCache.erase(k);
162 tenantsRemoved++;
163 }
164
165 return tenantsRemoved;
166}
167
168std::string TenantCache::desc() const {
169 std::string s("@Generation: ");

Callers 4

monitorTenantMapMethod · 0.45
Future<Void> _startFunction · 0.45
resetCipherEssentialsMethod · 0.45

Calls 3

cacheGenerationMethod · 0.80
push_backMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected