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

Method addCacheRange

fdbserver/StorageCache.actor.cpp:263–270  ·  view source on GitHub ↗

Puts the given cacheRange into cachedRangeMap. The caller is responsible for adding cacheRanges for all ranges in cachedRangeMap.getAffectedRangesAfterInsertion(newCacheRange->keys)), because these cacheRanges are invalidated by the call.

Source from the content-addressed store, hash-verified

261 // for all ranges in cachedRangeMap.getAffectedRangesAfterInsertion(newCacheRange->keys)), because these
262 // cacheRanges are invalidated by the call.
263 void addCacheRange(CacheRangeInfo* newCacheRange) {
264 ASSERT(!newCacheRange->keys.empty());
265 newCacheRange->changeCounter = ++cacheRangeChangeCounter;
266 //TraceEvent(SevDebug, "AddCacheRange", this->thisServerID).detail("KeyBegin", newCacheRange->keys.begin).detail("KeyEnd", newCacheRange->keys.end).
267 // detail("State", newCacheRange->isReadable() ? "Readable" : newCacheRange->notAssigned() ? "NotAssigned" :
268 // "Adding").detail("Version", this->version.get());
269 cachedRangeMap.insert(newCacheRange->keys, Reference<CacheRangeInfo>(newCacheRange));
270 }
271 void addMutation(KeyRangeRef const& cachedKeyRange, Version version, MutationRef const& mutation);
272 void applyMutation(MutationRef const& m, Arena& arena, VersionedData& data);
273

Callers 3

coalesceCacheRangesFunction · 0.80
cacheWarmupFunction · 0.80

Calls 2

emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected