Re: svn_fs/svn_repo repository lock API

2012-08-23 Thread C. Michael Pilato
On 08/22/2012 03:39 PM, Philip Martin wrote: > I'm currently using BDB's svn_repos lock for the BDB freeze so that > makes a BDB repository completely unreadable while frozen. No BDB > commits can start while frozen. Starting a BDB freeze has to wait for > in-progress commits to finish. Strictly

Re: svn_fs/svn_repo repository lock API

2012-08-22 Thread Johan Corveleyn
On Thu, Aug 23, 2012 at 12:26 AM, Philip Martin wrote: > Johan Corveleyn writes: > >> Ok, let me try to decipher what that means for users. >> >> - New commit will block: does this mean that 'svn commit -mm somefile' >> will simply hang (until the repository is unfrozen, or until the >> client-si

Re: svn_fs/svn_repo repository lock API

2012-08-22 Thread Philip Martin
Johan Corveleyn writes: > Ok, let me try to decipher what that means for users. > > - New commit will block: does this mean that 'svn commit -mm somefile' > will simply hang (until the repository is unfrozen, or until the > client-side timeout is reached)? Can it be cancelled? > > - Commit in pro

Re: svn_fs/svn_repo repository lock API

2012-08-22 Thread Johan Corveleyn
On Wed, Aug 22, 2012 at 9:39 PM, Philip Martin wrote: > Johan Corveleyn writes: > >> On Fri, Aug 10, 2012 at 10:22 AM, Philip Martin >> wrote: >>> Johan Corveleyn writes: >>> So, say for a standard 1.8 FSFS repository, is there a timeout for commits? What's the timeout (is it configur

Re: svn_fs/svn_repo repository lock API

2012-08-22 Thread Philip Martin
Johan Corveleyn writes: > On Fri, Aug 10, 2012 at 10:22 AM, Philip Martin > wrote: >> Johan Corveleyn writes: >> >>> So, say for a standard 1.8 FSFS repository, is there a timeout for >>> commits? What's the timeout (is it configurable?)? How will the commit >>> fail when it reaches the timeout

Re: svn_fs/svn_repo repository lock API

2012-08-22 Thread Johan Corveleyn
On Fri, Aug 10, 2012 at 10:22 AM, Philip Martin wrote: > Johan Corveleyn writes: > >> So, say for a standard 1.8 FSFS repository, is there a timeout for >> commits? What's the timeout (is it configurable?)? How will the commit >> fail when it reaches the timeout? > > I don't think there is a time

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Philip Martin
Branko Čibej writes: > On 10.08.2012 01:15, Philip Martin wrote: >> Philip Martin writes: >> >>> Yes, I think so. The process executes something like >>> >>>pragma locking_mode = exclusive; >>>begin exclusive transaction; >>>commit transaction; >>> >>> and then the lock persists unt

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Philip Martin
Philip Martin writes: > This means that a big/long commit that has taken the > rep-cache lock (sent the first text delta) will block the freeze until > that commit completes/aborts. For Apache the rep-cache lock is probably only held for the duration of the HTTP request, not the whole commit. s

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Philip Martin
Branko Čibej writes: > I suppose anything that can make changes to the repository -- commit and > revprop change? -- should, if possible, detect the freeze and > immediately return an appropriate error. I don't see how that is possible: the freeze is just the write-lock. The only difference betw

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Philip Martin
Johan Corveleyn writes: > So, say for a standard 1.8 FSFS repository, is there a timeout for > commits? What's the timeout (is it configurable?)? How will the commit > fail when it reaches the timeout? I don't think there is a timeout for the main write-lock. There is a 10s timeout for the rep-

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Branko Čibej
On 10.08.2012 10:10, Johan Corveleyn wrote: > On Fri, Aug 10, 2012 at 1:09 AM, Philip Martin > wrote: >> Ben Reser writes: >> >>> On Thu, Aug 9, 2012 at 12:51 PM, Johan Corveleyn wrote: What does a frozen repository actually look like for clients? I assume only write operations are aff

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Johan Corveleyn
On Fri, Aug 10, 2012 at 1:09 AM, Philip Martin wrote: > Ben Reser writes: > >> On Thu, Aug 9, 2012 at 12:51 PM, Johan Corveleyn wrote: >>> What does a frozen repository actually look like for clients? I assume >>> only write operations are affected. What happens to a commit or a >>> propset or a

Re: svn_fs/svn_repo repository lock API

2012-08-10 Thread Philip Martin
Branko Čibej writes: > On 10.08.2012 01:15, Philip Martin wrote: >> Philip Martin writes: >> >>> Yes, I think so. The process executes something like >>> >>>pragma locking_mode = exclusive; >>>begin exclusive transaction; >>>commit transaction; >>> >>> and then the lock persists unt

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Branko Čibej
On 10.08.2012 01:15, Philip Martin wrote: > Philip Martin writes: > >> Yes, I think so. The process executes something like >> >>pragma locking_mode = exclusive; >>begin exclusive transaction; >>commit transaction; >> >> and then the lock persists until the database connection is clos

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Philip Martin
Mark Phippard writes: > Does our write lock block svn lock/unlock as well as revprop edits? Yes, for FSFS. I haven't investigated a BDB implementation of freeze. -- Certified & Supported Apache Subversion Downloads: http://www.wandisco.com/subversion/download

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Mark Phippard
On Aug 9, 2012, at 7:15 PM, Philip Martin wrote: > Philip Martin writes: > >> Yes, I think so. The process executes something like >> >> pragma locking_mode = exclusive; >> begin exclusive transaction; >> commit transaction; >> >> and then the lock persists until the database connectio

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Philip Martin
Philip Martin writes: > Yes, I think so. The process executes something like > >pragma locking_mode = exclusive; >begin exclusive transaction; >commit transaction; > > and then the lock persists until the database connection is closed or > the process exits. I think it might also wo

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Philip Martin
Ben Reser writes: > On Thu, Aug 9, 2012 at 12:51 PM, Johan Corveleyn wrote: >> On Thu, Aug 9, 2012 at 10:06 AM, Philip Martin >> wrote: >>> The freeze-lock is similar to a write-lock: it exists for the duration >>> of the process that creates it. For scripts my trial freeze-program has >>> an

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Philip Martin
Stefan Fuhrmann writes: > On Thu, Aug 9, 2012 at 10:06 AM, Philip Martin > wrote: >> The freeze-lock is similar to a write-lock: it exists for the duration >> of the process that creates it. > > I see. Makes sense. Will it also work for the sqlite lock? > (you mentioned that you would like to lo

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Ben Reser
On Thu, Aug 9, 2012 at 12:51 PM, Johan Corveleyn wrote: > On Thu, Aug 9, 2012 at 10:06 AM, Philip Martin > wrote: >> The freeze-lock is similar to a write-lock: it exists for the duration >> of the process that creates it. For scripts my trial freeze-program has >> an interface like: >> >>fr

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Johan Corveleyn
On Thu, Aug 9, 2012 at 10:06 AM, Philip Martin wrote: > Stefan Fuhrmann writes: > >> On Wed, Aug 8, 2012 at 4:57 PM, Mark Moe wrote: >>> This would be useful for our us too. I would add "freeze" to the start and >>> "unfreeze" to the end of the script we use to rsync a copy of our repo (and >>>

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Stefan Fuhrmann
On Thu, Aug 9, 2012 at 10:06 AM, Philip Martin wrote: > Stefan Fuhrmann writes: > >> On Wed, Aug 8, 2012 at 4:57 PM, Mark Moe wrote: >>> This would be useful for our us too. I would add "freeze" to the start and >>> "unfreeze" to the end of the script we use to rsync a copy of our repo (and >>>

Re: svn_fs/svn_repo repository lock API

2012-08-09 Thread Philip Martin
Stefan Fuhrmann writes: > On Wed, Aug 8, 2012 at 4:57 PM, Mark Moe wrote: >> This would be useful for our us too. I would add "freeze" to the start and >> "unfreeze" to the end of the script we use to rsync a copy of our repo (and >> associated files) to an off-site network share. > > If freeze

Re: svn_fs/svn_repo repository lock API

2012-08-08 Thread Stefan Fuhrmann
On Wed, Aug 8, 2012 at 4:57 PM, Mark Moe wrote: > This would be useful for our us too. I would add "freeze" to the start and > "unfreeze" to the end of the script we use to rsync a copy of our repo (and > associated files) to an off-site network share. If freeze and unfreeze can be used quasi-in

Re: svn_fs/svn_repo repository lock API

2012-08-08 Thread Mark Moe
This would be useful for our us too. I would add "freeze" to the start and "unfreeze" to the end of the script we use to rsync a copy of our repo (and associated files) to an off-site network share. Thanks, - Mark

Re: svn_fs/svn_repo repository lock API

2012-08-08 Thread Philip Martin
"C. Michael Pilato" writes: > On 08/08/2012 07:38 AM, Philip Martin wrote: >> I've been asked about using operating system snapshots to make backups >> of live repositories. These could be filesytem snapshots like ZFS or >> FreeBSD's UFS2, or block level snapshots like Linux's LVM, or maybe even

Re: svn_fs/svn_repo repository lock API

2012-08-08 Thread C. Michael Pilato
On 08/08/2012 07:38 AM, Philip Martin wrote: > I've been asked about using operating system snapshots to make backups > of live repositories. These could be filesytem snapshots like ZFS or > FreeBSD's UFS2, or block level snapshots like Linux's LVM, or maybe even > a Windows shadow copy. The reas