Controller.cc
Go to the documentation of this file.
205 const int64_t memMax = static_cast<int64_t>(min(Config.Store.maxInMemObjSize, Config.memMaxSize));
530 debugs(20, 7, fits << ": " << mem_node::InUseCount() << '+' << pagesRequired << '?' << store_pages_max);
569 debugs(20, 3, "removed " << removed << " out of " << hot_obj_count << " memory-cached entries");
820 debugs(20, 5, "removing collapsing requirement for " << *collapsed << " since remote writer probably got headers");
int transientReaders(const StoreEntry &) const
number of the transient entry readers some time ago
Definition: Controller.cc:651
void memoryDisconnect(StoreEntry &)
disassociates the entry from the memory cache, preserving cached data
Definition: Controller.cc:622
class Ping::pingStats_ stats
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Controller.cc:166
void memoryOut(StoreEntry &, const bool preserveSwappable)
called to get rid of no longer needed entry data in RAM, if any
Definition: Controller.cc:594
bool updateOnNotModified(const StoreEntry &e304)
Definition: store.cc:1436
virtual void create() override
create system resources needed for this store to operate in the future
Definition: Controller.cc:78
static bool Enabled()
whether Squid is correctly configured to use a shared memory cache
Definition: MemStore.h:68
bool hasReadableDiskEntry(const StoreEntry &) const
whether there is a disk entry with e.key
Definition: Controller.cc:321
StoreEntry * peekAtLocal(const cache_key *)
Definition: Controller.cc:416
void addReading(StoreEntry *, const cache_key *)
Definition: Controller.cc:771
void checkTransients(const StoreEntry &) const
Definition: Controller.cc:922
RemovalPurgeWalker *(* PurgeInit)(RemovalPolicy *policy, int max_scan)
Definition: RemovalPolicy.h:51
void referenceBusy(StoreEntry &e)
update reference counters of the recently touched entry
Definition: Controller.cc:237
bool transientsReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
Definition: Controller.cc:473
virtual int callback() override
called once every main loop iteration; TODO: Move to UFS code.
Definition: Controller.cc:229
bool memoryCacheHasSpaceFor(const int pagesRequired) const
whether the memory cache is allowed to store that many additional pages
Definition: Controller.cc:526
int hot_obj_count
void memoryEvictCached(StoreEntry &)
Definition: Controller.cc:611
bool IamWorkerProcess()
whether the current process handles HTTP transactions and such
Definition: stub_tools.cc:47
int store_swap_low
void transientsCompleteWriting(StoreEntry &)
marks the entry completed for collapsed requests
Definition: Controller.cc:640
virtual void evictCached(StoreEntry &) override
Definition: Controller.cc:495
bool allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &)
tries to make the entry available for collapsing future requests
Definition: Controller.cc:754
int64_t accumulateMore(StoreEntry &) const
Definition: Controller.cc:485
void(* Referenced)(RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:48
#define TexcHere(msg)
legacy convenience macro; it is not difficult to type Here() now
Definition: TextException.h:59
void addWriting(StoreEntry *, const cache_key *)
Definition: Controller.cc:779
Definition: Controller.h:23
void transientsDisconnect(StoreEntry &)
disassociates the entry from the intransit table
Definition: Controller.cc:658
Definition: RequestFlags.h:21
void stopSharing(StoreEntry &)
stop any current (and prevent any future) SMP sharing of the given entry
Definition: Controller.cc:630
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
Definition: store.cc:1891
Definition: StoreSearch.h:16
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:1975
Definition: RequestMethod.h:27
virtual void evictIfFound(const cache_key *) override
Definition: Controller.cc:506
bool hasMemStore() const
whether there is a corresponding locked shared memory table entry
Definition: Store.h:211
bool markedForDeletion(const cache_key *key) const
Definition: Controller.cc:305
struct SquidConfig::@94 Swap
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Controller.cc:111
FREE destroyStoreEntry
size_t store_pages_max
void syncCollapsed(const sfileno)
Update local intransit entry after changes made by appending worker.
Definition: Controller.cc:791
hash_table * store_table
static int store_dirs_rebuilding
the number of cache_dirs being rebuilt; TODO: move to Disks::Rebuilding
Definition: Controller.h:139
void transientsClearCollapsingRequirement(StoreEntry &e)
removes collapsing requirement (for future hits)
Definition: Controller.cc:665
bool anchorToCache(StoreEntry &e, bool &inSync)
Definition: Controller.cc:890
Definition: RefCount.h:27
int64_t store_maxobjsize
void(* Dereferenced)(RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:49
void Init(Controller *root=nullptr)
initialize the storage module; a custom root is used by unit tests only
Definition: Controller.cc:941
bool keepForLocalMemoryCache(StoreEntry &e) const
whether e should be kept in local RAM for possible future caching
Definition: Controller.cc:577
Definition: Store.h:42
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Controller.cc:187
StoreEntry * findCallbackXXX(const cache_key *)
Definition: Controller.cc:400
void updateOnNotModified(StoreEntry *old, StoreEntry &e304)
using a 304 response, update the old entry (metadata and reply headers)
Definition: Controller.cc:721
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Controller.cc:92
void handleIdleEntry(StoreEntry &)
called when the entry is no longer needed by any transaction
Definition: Controller.cc:672
Definition: mem_node.h:18
void allowSharing(StoreEntry &, const cache_key *)
indexes and adds SMP-tracking for an ephemeral peek() result
Definition: Controller.cc:370
bool transientsWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
Definition: Controller.cc:479
bool hasTransients() const
whether there is a corresponding locked transients table entry
Definition: Store.h:209
Definition: MemStore.h:30
void freeMemorySpace(const int spaceRequired)
Definition: Controller.cc:535
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: Controller.cc:180
Definition: SquidConfig.h:60
void checkFoundCandidate(const StoreEntry &) const
flags problematic entries before find() commits to finalizing/returning them
Definition: Controller.cc:328
bool markedForDeletionAndAbandoned(const StoreEntry &) const
Definition: Controller.cc:312
bool hittingRequiresCollapsing() const
whether this entry can feed collapsed requests and only them
Definition: Store.h:214
bool swappedOut() const
whether the entire entry is now on disk (possibly marked for deletion)
Definition: Store.h:134
int store_swap_high
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:14
bool dereferenceIdle(StoreEntry &, bool wantsLocalMemory)
Definition: Controller.cc:262
struct SquidConfig::@108 Store