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

Re: [PATCH] Fix "database is locked" error when committing during rep-cache.db verification

From: Nathan Hartman <hartman.nathan_at_gmail.com>
Date: Thu, 21 May 2020 12:26:09 -0400

On Thu, May 21, 2020 at 11:53 AM Johan Corveleyn <jcorvel_at_gmail.com> wrote:
>
> Trying to summarize this thread a bit. I apologize in advance if I
> forgot something, or have misrepresented any of the points that were
> raised (feel free to correct / add).
>
> Denis summed up the following problems that might happen while
> 'verify' locks the repcache.db:
>
> > 1. a post-commit error "database is locked"
> > 2. new representations will not be added in the rep-cache.db
> > 3. deduplication does not work for new data committed at this time
> > 4. commits work with delays.
>
> We have also established that the new tool build-repcache is not
> suitable for post-factum fixing of 3). It does not reprocess already
> committed revisions.
>
> We are currently considering two approaches to address these issues:

Snip.

Both come with various pros/cons.

Another possibility: Handle this with documentation.

Early in the thread, Daniel points out:

> (Also, there's the option of rsync'ing the repository somewhere and
> running «verify» on the copy.

Although that doesn't solve the above-mentioned concerns for in-place
hot verification, it could be added to our docs as a recommendation.
Something along the lines:

[[[

Please note that while the representation cache is locked for
verification, any commits made during that time may be subject to the
following:

(Explain 1, 2, 3, 4)

Depending on your needs, these may or may not represent an actual
problem at your site. However, two workarounds are possible:

1. Disable access to the server for the duration of the 'svnadmin
verify' operation, or

2. Make a hotcopy of the repository and run 'svnadmin verify' on the
copy.

]]]

We might recommend that admins do this as part of their regular backup
routine, i.e., back up the repo and then immediately run verify on the
backup. Solves two problems at the same time.

Nathan
Received on 2020-05-21 18:26:30 CEST

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