store_client.cc
Go to the documentation of this file.
170 discardableHttpEnd_ = NaturalSum<int64_t>(entry->mem().baseReply().hdr_sz, result.offset, result.length).value();
390 if (!sendHttpHeaders && anEntry->store_status == STORE_PENDING && nextHttpReadOffset() >= mem->endOffset()) {
546 const auto nextStoreReadOffset = NaturalSum<int64_t>(mem->swap_hdr_sz, nextHttpReadOffset()).value();
658 if (httpResponsePart.length && entry->mem_obj->inmem_lo == 0 && entry->objectLen() <= (int64_t)Config.Store.maxInMemObjSize && Config.onoff.memory_cache_disk) {
706 _callback.notifier = asyncCall(90, 4, "store_client::FinishCallback", cbdataDialer(store_client::FinishCallback, this));
751 debugs(90, DBG_IMPORTANT, "ERROR: Failed to unpack Store entry metadata: " << CurrentException);
785 debugs(90, 3, "storeUnregister: Consistency failure - store client being unregistered is not in the mem object's list for '" << e->getMD5Text() << "'");
974 debugs(90, 3, "quick-abort? YES bad content length (" << curlen << " of " << expectlen << " bytes received)");
1026 if (adjustableReply.parseTerminatedPrefix(parsingBuffer->c_str(), parsingBuffer->contentSize()))
1044 debugs(90, 5, "discovered " << hdr_sz << "-byte HTTP headers in memory after reading some of them from disk: " << *parsingBuffer);
static void FinishCallback(store_client *)
finishCallback() wrapper; TODO: Add NullaryMemFunT for non-jobs.
Definition: store_client.cc:147
Definition: parse.c:104
struct store_client::Callback _callback
int storeClientIsThisAClient(store_client *sc, void *someClient)
struct StatCounters::@120 swap
Definition: FilledChecklist.h:33
void maybeWriteFromDiskToMemory(const StoreIOBuffer &)
Definition: store_client.cc:650
void readHeader(const char *buf, ssize_t len)
Definition: store_client.cc:727
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
void UnpackHitSwapMeta(char const *, ssize_t, StoreEntry &)
deserializes entry metadata from the given buffer into the cache hit entry
Definition: SwapMetaIn.cc:310
void STRCB(void *their_data, const char *buf, ssize_t len, StoreIOState::Pointer self)
Definition: StoreIOState.h:29
struct SquidConfig::@98 accessList
acl_access * collapsedForwardingAccess
Definition: SquidConfig.h:406
void noteNews()
if necessary and possible, informs the Store reader about copy() result
Definition: store_client.cc:687
bool canReadFromMemory() const
whether at least one byte wanted by the client is in memory
Definition: store_client.cc:497
void error(char *format,...)
Definition: StoreClient.h:200
StoreIOBuffer & positionAt(const int64_t newOffset)
convenience method for changing the offset of a being-configured buffer
Definition: StoreIOBuffer.h:47
Definition: cbdata.cc:37
struct SquidConfig::@97 onoff
struct SquidConfig::@83 quickAbort
static void storeClientCopy2(StoreEntry *e, store_client *sc)
Definition: store_client.cc:333
RefCount< AsyncCallT< Dialer > > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:156
AsyncCall::Pointer notifier
a scheduled asynchronous finishCallback() call (or nil)
Definition: StoreClient.h:215
static void Reset()
forgets the current context, setting it to nil/unknown
Definition: CodeContext.cc:77
void skipHttpHeadersFromDisk()
skips HTTP header bytes previously loaded from disk
Definition: store_client.cc:1039
UnaryCbdataDialer< Argument1 > cbdataDialer(typename UnaryCbdataDialer< Argument1 >::Handler *handler, Argument1 *arg1)
Definition: AsyncCbdataCalls.h:40
int64_t nextHttpReadOffset() const
The offset of the next stored HTTP response byte wanted by the client.
Definition: store_client.cc:508
void storeRead(StoreIOState::Pointer sio, char *buf, size_t size, off_t offset, StoreIOState::STRCB *callback, void *callback_data)
Definition: store_io.cc:79
Definition: StoreIOBuffer.h:15
bool hasDisk(const sdirno dirn=-1, const sfileno filen=-1) const
Definition: store.cc:1929
Definition: MemBuf.h:23
Definition: dlink.h:14
bool onCollapsingPath() const
whether Squid configuration allows collapsing for this transaction
Definition: store_client.cc:52
virtual LogTags * loggingTags() const =0
struct SquidConfig::@95 Store
std::ostream & CurrentException(std::ostream &os)
prints active (i.e., thrown but not yet handled) exception
Definition: TextException.cc:88
bool parseHttpHeadersFromDisk()
Definition: store_client.cc:1001
virtual void fillChecklist(ACLFilledChecklist &) const =0
configure the given checklist (to reflect the current transaction state)
static bool CheckQuickAbortIsReasonable(StoreEntry *entry)
Definition: store_client.cc:900
bool startCollapsingOn(const StoreEntry &, const bool doingRevalidation) const
Definition: store_client.cc:66
Definition: MemObject.h:33
int64_t discardableHttpEnd_
the client will not use HTTP response bytes with lower offsets (if any)
Definition: StoreClient.h:183
bool didCollapse
whether startCollapsingOn() was called and returned true
Definition: StoreClient.h:64
Definition: Store.h:37
std::optional< Store::ParsingBuffer > parsingBuffer
Definition: StoreClient.h:192
Definition: DelayId.h:21
void dumpStats(MemBuf *output, int clientNumber) const
Definition: store_client.cc:1055
struct store_client::@129 flags
Definition: StoreClient.h:73
Callback()=default
void copy(StoreEntry *, StoreIOBuffer, STCB *, void *)
Definition: store_client.cc:235
bool moreToRead() const
Whether Store has (or possibly will have) more entry data for us.
Definition: store_client.cc:308
bool startSwapin()
opens the swapin "file" if possible; otherwise, fail()s and returns false
Definition: store_client.cc:435
bool hittingRequiresCollapsing() const
whether this entry can feed collapsed requests and only them
Definition: Store.h:215
bool hasParsedReplyHeader() const
whether this entry has access to [deserialized] [HTTP] response headers
Definition: store.cc:231
bool swappingOut() const
whether we are in the process of writing this entry to disk
Definition: Store.h:133
Definition: CodeContext.h:52
bool swappedOut() const
whether the entire entry is now on disk (possibly marked for deletion)
Definition: Store.h:135
constexpr bool Less(const A a, const B b)
whether integer a is less than integer b, with correct overflow handling
Definition: SquidMath.h:48
void finishCallback()
finishes a copy()-STCB sequence by synchronously calling STCB
Definition: store_client.cc:154
int storeUnregister(store_client *sc, StoreEntry *e, void *data)
Definition: store_client.cc:765
void storeClientCopy(store_client *sc, StoreEntry *e, StoreIOBuffer copyInto, STCB *callback, void *data)
Definition: store_client.cc:224
void handleBodyFromDisk()
de-serializes HTTP response (partially) read from disk storage
Definition: store_client.cc:627
store_client * storeClientListAdd(StoreEntry *e, void *data)
Definition: store_client.cc:124
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products