Re: Pristine text missing - cleanup doesn't work
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 22 Apr 2013 18:27:35 +0100 (BST)
Bert Huijben wrote:
Hmm, you're right, when using a current 1.8-dev build and a fresh WC.
When I tested this scenario the other day it was in an old WC that has been upgraded from time to time, and is now supposedly at 1.8. There (I just repeated to make sure) if I set the refcount to 0, then 'svn cleanup' quietly deletes the 'pristine' table row and the file.
The DB schema in that WC does not match what is should be for 1.8 -- it doesn't have any 'REFERENCES PRISTINE (checksum)' clauses in it. It may have got that way by being upgraded incrementally through several 1.7-era development versions, so we need not be too concerned about it.
(While investigating, I discovered and filed issue #4358 "Svn WC 1.8 upgrade from 1.7 - wrong schema", <http://subversion.tigris.org/issues/show_bug.cgi?id=4358>. The schema differences there do *not* include a missing 'REFERENCES' clause.)
I tested with a checkout containing just one file in four freshly created WCs:
- checkout with 1.6.20, upgrade with 1.8.x
and in each of these, I ran:
- sqlite3 'update pristine set refcount=0'
In each case, 'svn cleanup' errored out with an 'foreign key constraint failed' error, preventing any further damage.
So that seems to be fairly safe when the foreign key constraint checking is enabled.
>> The foreign key check enforces this, but at a certainly not-null performance
If we removed the ref-count-updating triggers, then we wouldn't be able to select pristines for deletion based on refount==0. What would we do instead?
> Given that we never update the reference count manually I would be very
Well, it has happened before and it will probably happen again.
- Julian
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.