wessels [Thu, 27 May 1999 09:26:10 +0000 (09:26 +0000)]
FreeBSD's pthreads breaks dup2(). This means we can't use dup2()
to try to find SQUID_MAXFD in configure. To get around the bug,
we make a temporary LDFLAGS string and remove -pthread.
wessels [Wed, 26 May 1999 11:01:05 +0000 (11:01 +0000)]
Some fixes for swapping out objects that are in STORE_OK state. Need
to make sure that we really write all the data and queue the
swapout file for closing.
DO NOT allow swapout of non-special objects during store rebuilding
phase. This greatly speeds up the rebuild process and prevents
large memory consumption from objects that want to be deleted but
must wait until validation completes.
wessels [Wed, 26 May 1999 10:58:52 +0000 (10:58 +0000)]
Another while loop in storeCleanup() event so that we do at least
50 entries per call, instead of just one hash bucket which might
only have a handful of objects.
wessels [Wed, 26 May 1999 10:57:46 +0000 (10:57 +0000)]
Buffer the StoreEntry when building a mime icon object.
Also set the ENTRY_SPECIAL flag before calling storeComplete so
that it gets swapped out with the new no-swapout-during-rebuild
scheme.
wessels [Wed, 26 May 1999 09:08:12 +0000 (09:08 +0000)]
Two storeSwapOut() changes:
1) with new store-FS scheme, we don't get write callbacks. This means
we were getting some objects "stuck" because we had, say 32K in memory,
but only wrote 8K in storeSwapOut() and there was no signal to make
us write another block. Now we write as many blocks as we can,
instead of just one.
2) Re-fixed the case where storeSwapOut() gets called because the
store_status has changed to STORE_OK, but there is no data to swap
out. Now close the swapout file, as done at the end of storeSwapOut().
wessels [Sat, 22 May 1999 08:31:18 +0000 (08:31 +0000)]
Fixed a bug with closing swapout files around the time we call
storeComplete(). Used to be that storeComplete() would call
storeClose() if there was a swapout.sio structure. This was
essentially the right thing to do, but kind of awkwardly implemented.
A better choice is to have storeSwapOut() close objects that are
in STORE_OK state and if inmem_hi == queued_offset.
wessels [Thu, 20 May 1999 03:57:47 +0000 (03:57 +0000)]
Since there is no write callback with new store filesystem interface,
we must pass a free function to the low level write routines to free
the write buffer after its done
wessels [Wed, 12 May 1999 02:14:14 +0000 (02:14 +0000)]
Markus Leutwyler wrote:
>I have attached two logfiles (cache.log .. taken with debug = all,9)
>that show the different behaviour between the small text file and the
>bigger binary file. The FTP server is replying to the SIZE command with
>"213 0" (0 bytes) and this is sent to the browser as Content-length. I
>just wonder why the text file works and the binary file not. Could
>someone look at the logfile and try to figure out what's going on
>exactly?
Henrik:
SIZE is only used on binary transfers, not text transfers. Attached is
a small workaround which causes Squid to ignore 0 replies to SIZE.
wessels [Wed, 12 May 1999 02:11:48 +0000 (02:11 +0000)]
Kenneth R. Brownfield wrote:
> When squid's configure was modified to turn on dlmalloc automatically for
> Solaris/x86, it looks like it didn't get turned on completely.
> Running configure without --enable-dlmalloc says that it turns on dlmalloc
> by default, but 'make' never compiles or links with dlmalloc.
> --enable-dlmalloc is still necessary to truly include dlmalloc.
From: Henrik Nordstrom <hno@hem.passagen.se>
Patch attached for the dlmalloc configure issue.
wessels [Wed, 12 May 1999 00:51:47 +0000 (00:51 +0000)]
Fixed a bug with the new ERR_TOO_BIG error message. Somtimes
we'll get non-GET requests that don't have content-length
(like CONNECT, for example).
Also tried to force closing of persistent connections after sending
an "unsupported request" error message. Those mostly come from
buggy browsers that send SSL requests down a persistent HTTP connection.
wessels [Wed, 12 May 1999 00:45:46 +0000 (00:45 +0000)]
In function neighborsDigestSelect(): added a check for the
request->flag.hierarchical flag. If the flag is not set, then
we should not use cache digests to select a neighbor.
Normally this was not a problem because non-hierarchical
requests are usually also non-cachable, and digests only
include cachable objects. However, it seems that we sometimes
get false hits from the digest for non-hierarchical objects,
specifically a POST request.
If the POST goes to a sibling, we'll add only-if-cached. Of course
the POST response should not be cached, so the response is 504
Gateway Timeout. The originating cache can not re-forward the
request because it was a POST (well, maybe it could, but thats
a slippery slope). The user gets the ugly cache-miss and
only-if-cached error message.
wessels [Wed, 5 May 1999 01:39:00 +0000 (01:39 +0000)]
From: Alex Rousskov <rousskov@ircache.net>
Here is a small patch to make Squid more robust if cache or server
clock is skewed. The right thing is probably to make age and
entry->timestamp semi-independant by adding a function that computes an
age based on all info available, including entry->timestamp. The patch
below simply adjusts entry->timestamp so it does not lead to negative
ages later. If entry->timestamp should be based on "cache time" rather
than "server time", the patch should not have bad side effects.
wessels [Tue, 4 May 1999 03:54:55 +0000 (03:54 +0000)]
An initial implementation of new store API. Everything goes through
fucntions in store_io.c, which is basically a level of indirection
for different types of filesystems.
This still needs a lot of work. Have to move all rebuild functions
into store_io_ufs.c. Have to add the indirection, instead of hard
coding everything to the UFS code.