> -----Original Message-----
> From: Bert Huijben [mailto:b...@qqmail.nl]
> Sent: maandag 22 april 2013 17:18
> To: 'Julian Foad'; 'Johan Corveleyn'
> Cc: 'Subversion Development'
> Subject: RE: Pristine text missing - cleanup doesn't work
> 
> 
> 
> > -----Original Message-----
> > From: Julian Foad [mailto:julianf...@btopenworld.com]
> > Sent: maandag 22 april 2013 16:34
> > To: Johan Corveleyn
> > Cc: Bert Huijben; Subversion Development
> > Subject: Re: Pristine text missing - cleanup doesn't work
> >
> > I have filed this as issue #4357, "Pristine text missing - cleanup doesn't
> work",
> > with a reference to this email thread.
> >
> > I thought of the following possible improvements, which I have noted in
> the
> > doc string of pristine_cleanup_wcroot():
> >
> >  * TODO: At least check that any zero refcount is really correct, before
> >  *       using it.
> 
> We already do this in debug builds.
> 
> The foreign key check enforces this, but at a certainly not-null performance
> cost (understatement). This is why I haven't enabled this for release builds.
> (The original reason for not enabling them was that it required a newer Sqlite
> version)
> 
> You can't delete a PRISTINE row that is used with foreign keys enabled. (That
> part is currently not backed by an index... the performance killer. And
> optimized away by our reference counting via triggers)

If we perform a check to verify the reference count before using it for cleanup 
we should just remove the reference count updating triggers. This gives a few 
percent performance boost to every update/add/delete on the NODES table.


Given that we never update the reference count manually I would be very 
surprised if we could ever find a reason why somebody not using the Sqlite db 
directly (via Sqlite or a third party sqlite db implementation) would get the 
refcount in a broken state.

        Bert

Reply via email to