[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1509080 - /subversion/trunk/subversion/libsvn_subr/spillbuf.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 01 Aug 2013 08:35:38 +0200

On 01.08.2013 07:46, Greg Stein wrote:
> On Thu, Aug 1, 2013 at 12:20 AM, <brane_at_apache.org> wrote:
>> Author: brane
>> Date: Thu Aug 1 05:20:21 2013
>> New Revision: 1509080
>>
>> URL: http://svn.apache.org/r1509080
>> Log:
>> Begin extending spillbufs so that we can use them for compressed pristines.
>>
>> * subversion/libsvn_subr/spillbuf.c (svn_spillbuf_t):
>> Add new fields delete_on_close, spill_all_contents, dirpath and temp_path.
> Woah woah woah... Are you twisting a spillbuf into a buffered
> file-write mechanism?
>
> I don't understand the motivation here. Spillbufs for for reading
> *and* writing. Pristine creation is just writing.

The design for compressed pristines[citation required] assumes that
small compressed pristine files will be stored entirely as blobs in a
SQLite database, whereas large ones will be stored on-disk. This means
we'll need "something" that can streamily compress to memory and copy
said memory to a blob, or spill the whole compressed contents to disk if
they exceed the threshold.

Those "streamy", "write", "read" and "spill" requirements made me look
at spillbufs -- and it turned out that they can be fairly easily
modified to fit the bill for the backing store of a compressed-pristine
(writer) stream, without impacting the features or performance of their
current use case -- save for a few extra bytes in the spillbuf struct
and an if or two in the code.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-08-01 08:36:29 CEST

This is an archived mail posted to the Subversion Dev mailing list.