Transients.cc
Anchor & writeableEntry(const AnchorId anchorId)
writeable anchor for the entry created by openForWriting()
Definition: StoreMap.cc:237
class Ping::pingStats_ stats
void monitorIo(StoreEntry *, const cache_key *, const Store::IoStatus)
Definition: Transients.cc:215
void startAppending(const sfileno fileno)
restrict opened for writing entry to appending operations; allow reads
Definition: StoreMap.cc:191
virtual void getStats(StoreInfoStats &stats) const override
collect statistics
Definition: Transients.cc:56
TransientsMap * map
shared packed info indexed by Store keys, for creating new StoreEntries
Definition: Transients.h:107
void anchorEntry(StoreEntry &, const sfileno, const Ipc::StoreMapAnchor &)
fills (recently created) StoreEntry with information currently in Transients
Definition: Transients.cc:286
void disconnect(StoreEntry &)
the caller is done writing or reading the given entry
Definition: Transients.cc:373
int64_t shared_transient_entries_limit
Definition: SquidConfig.h:351
Definition: Segment.h:85
virtual uint64_t currentCount() const override
the total number of objects stored right now
Definition: Transients.cc:120
static Owner * Init(const SBuf &path, const int slotLimit)
initialize shared memory
Definition: StoreMap.cc:42
const Anchor * openForReading(const cache_key *const key, sfileno &fileno)
opens entry (identified by key) for reading, increments read level
Definition: StoreMap.cc:440
void status(const StoreEntry &e, EntryStatus &entryStatus) const
copies current shared entry metadata into entryStatus
Definition: Transients.cc:316
struct Ipc::StoreMapAnchor::Basics basics
const Anchor & readableEntry(const AnchorId anchorId) const
readable anchor for the entry created by openForReading()
Definition: StoreMap.cc:244
Definition: StoreMap.h:57
bool isWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
Definition: Transients.cc:413
void addWriterEntry(StoreEntry &, const cache_key *)
addEntry() helper used for cache entry creators/writers
Definition: Transients.cc:251
void setCollapsingRequirement(const bool required)
allow or forbid collapsed requests feeding
Definition: store.cc:1975
virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override
adjust slice-linked state before a locked Readable slice is erased
Definition: Transients.cc:310
bool hasWriter(const StoreEntry &)
whether we or somebody else is in the "writing to Transients" I/O state
Definition: Transients.cc:302
void addEntry(StoreEntry *, const cache_key *, const Store::IoStatus)
creates a new Transients entry
Definition: Transients.cc:234
StoreEntry * findCollapsed(const sfileno xitIndex)
return a local, previously collapsed entry
Definition: Transients.cc:185
virtual void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
Definition: Transients.cc:133
Anchor * openForWriting(const cache_key *const key, sfileno &fileno)
Definition: StoreMap.cc:140
virtual uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
Definition: Transients.cc:99
bool markedForDeletion(const cache_key *) const
Definition: Transients.cc:400
void completeWriting(const StoreEntry &e)
called when the in-transit entry has been successfully cached
Definition: Transients.cc:329
const Anchor * openOrCreateForReading(const cache_key *, sfileno &, const StoreEntry &)
openForReading() but creates a new entry if there is no old one
Definition: StoreMap.cc:103
void exportInto(StoreEntry &) const
load StoreEntry basics that were previously stored with set()
Definition: StoreMap.cc:979
Definition: Store.h:42
bool isReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
Definition: Transients.cc:407
const Anchor * peekAtWriter(const sfileno fileno) const
Definition: StoreMap.cc:297
size_t PageLimit()
the total number of shared memory pages that can be in use at any time
Definition: Pages.cc:55
virtual bool dereference(StoreEntry &e) override
Definition: Transients.cc:139
void addReaderEntry(StoreEntry &, const cache_key *)
Definition: Transients.cc:273
bool markedForDeletion(const cache_key *const)
Definition: StoreMap.cc:355
const Anchor & peekAtEntry(const sfileno fileno) const
Definition: StoreMap.cc:307
virtual void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
Definition: Transients.cc:93
void closeForReadingAndFreeIdle(const sfileno fileno)
same as closeForReading() but also frees the entry if it is unlocked
Definition: StoreMap.cc:506
bool hasTransients() const
whether there is a corresponding locked transients table entry
Definition: Store.h:209
static int64_t EntryLimit()
calculates maximum number of entries we need to store and map
Definition: Transients.cc:393
void abortWriting(const sfileno fileno)
stop writing the entry, freeing its slot for others to use if possible
Definition: StoreMap.cc:251
RunnerRegistrationEntry(TransientsRr)
size_t PageSize()
returns page size in bytes; all pages are assumed to be the same size
Definition: Pages.cc:28
static void Broadcast(const StoreEntry &e, const bool includingThisWorker=false)
notify other workers about changes in entry state (e.g., new data)
Definition: CollapsedForwarding.cc:70
static const SBuf MapLabel("transients_map")
shared memory segment path to use for Transients map
bool UsingSmp()
Whether there should be more than one worker process running.
Definition: tools.cc:693
virtual int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
Definition: Transients.cc:126
virtual void create()
called when the runner should create a new memory segment
Definition: Transients.cc:443
void clearCollapsingRequirement(const StoreEntry &e)
removes collapsing requirement (for future hits)
Definition: Transients.cc:201
sfileno fileNoByKey(const cache_key *const key) const
computes map entry anchor position for a given entry key
Definition: StoreMap.cc:912
aggregates anchor and slice owners for Init() caller convenience
Definition: StoreMap.h:233
High-level store statistics used by mgr:info action. Used inside PODs!
Definition: StoreStats.h:14
void switchWritingToReading(const sfileno fileno)
stop writing (or updating) the locked entry and start reading it
Definition: StoreMap.cc:211
virtual void evictIfFound(const cache_key *) override
Definition: Transients.cc:362
int readers(const StoreEntry &e) const
number of entry readers some time ago
Definition: Transients.cc:338