Re: squid-3 development: stmem, endOffset(), range requests

From: Adrian Chadd <adrian@dont-contact.us>
Date: Tue, 24 Aug 2004 10:37:41 +0800

On Mon, Aug 23, 2004, Henrik Nordstrom wrote:

> >.. now, at this point, the whole point behind content_length + hdr_sz
> >is the size of the _reply_. endOffset() is now _not_ the size of the
> >reply anymore. It is the highest position of the object we know about.
>
> What is the difference?

> So you say the difference is that before endOffset did indicate the amount
> of data known for the object, but now there may be holes?

endOffset() now returns the highest byte of the object with ranges.

in 2.5, a request like this:

ranges: 1-1000,2000-3000

the reply from the server would be 2kb (1-1000 and 2000-3000).
Whatever it is in 2.5 would return 2000 when the whole request was read.

In squid-3, it'd return 3000.

This could cause quite a few problems in the store code.

> So how is the code now supposed to know if all needed data is available in
> order to fix the lines above?

Thats what I'm going to need to think about. I'll try to figure out
what the current uses of endOffset() in the store and http.cc code
is and see what I'll need to do.

The 'hack' would be to write a routine to return how many bytes are
currently in the squid-3 stmem/MemObject. This may be enough for
the store code which uses it to swap objects out but I want to make
the http usage a bit nicer.

I suggest fixing this up and trying to get a stable looking devel release out
before we run around and try to replace anything like the callback methods.

Adrian

-- 
Adrian Chadd			I'm only a fanboy if
<adrian@creative.net.au>	    I emailed Wesley Crusher.
			
Received on Mon Aug 23 2004 - 20:38:10 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Sep 01 2004 - 12:00:04 MDT