You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2004/11/19 17:28:54 UTC

Locking: repos upgrades?

We have a standing promise that "no dump/loads will be necessary until 
2.0".  That means no fs schema changes.

But I'm a bit fuzzy on how this promise interacts with the repos/format 
file.

Specifically, svn 1.2 will now have two new BDB tables (and FSFS will 
also have grow some new data storage).  How are users going to upgrade 
to 1.2 smoothly?

1.  I seem to recall that when we added the 'uuids' table, there was 
some magic code that instantly created the table if not present.  Do we 
need to repeat that technique?

2.  Are we allowed to increment the 'format' file?  I'd certainly like 
to.  Otherwise, a process using libsvn_fs 1.1 can create a lock, but 
then a process using libsvn_fs 1.0 would silently ignore the lock 
without realizing it.  Does incrementing 'format' break our 
compatibility promises?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Nov 19, 2004 at 11:28:54AM -0600, Ben Collins-Sussman wrote:
>...
> 1.  I seem to recall that when we added the 'uuids' table, there was 
> some magic code that instantly created the table if not present.  Do we 
> need to repeat that technique?

Yeup.

> 2.  Are we allowed to increment the 'format' file?  I'd certainly like 
> to.  Otherwise, a process using libsvn_fs 1.1 can create a lock, but 
> then a process using libsvn_fs 1.0 would silently ignore the lock 
> without realizing it.  Does incrementing 'format' break our 
> compatibility promises?

I would say that you can increment it. A newer version can read all
old version repositories (and migrate forward as needed). An older
cannot read newer.

But I think that might be subject to argument. For example, on the
protocol side, we say that an old client against a new server just
doesn't get to use the new features. It might also be arguable that an
old FS implementation just can't use locking.

Personally, I think we stick to a strict "no dump/load to upgrade"
policy and allow that a repos can have its format changed to prevent
old FS libs from working with it.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Branko Čibej <br...@xbc.nu>.
Erik Huelsmann wrote:

>On Sat, 20 Nov 2004 00:27:19 -0500, Greg Hudson <gh...@mit.edu> wrote:
>  
>
>>On Fri, 2004-11-19 at 22:20, Garrett Rooney wrote:
>>    
>>
>>>  Otherwise it seems like we can never bump a repository or working copy
>>>format in 1.x, which seems kind of extreme to me.
>>>      
>>>
>>I think the language is pretty clear that we're allowed to bump the
>>repository format during a 1.x series, but that doesn't mean it's a good
>>idea.
>>
>>We know that forcing a dump and load for a downgrade will cause pain in
>>some number of situations, including some situations where people never
>>even considered using locking.  Unless we think it's really bad if a
>>lock is circumvented because someone accessed the repository with 1.1
>>server code, I think we should leave the version alone.
>>    
>>
>
>Well, yes, I think it is bad that people can use different binaries
>against the repository and circumvent the locks.
>
>With respect to downgrading the repository: I don't think the other
>tables change their layout (are they allowed to?), meaning that an
>upgrade will consist of:
>
>- <create new tables>
>- echo 4 > format
>
>Then can't we provide a downgrade script to do the reverse? No
>dump/load will be necessary, just as we promised. (This should make it
>into the faq even before it is implemented, I guess.)
>  
>
I was going to suggest something like this, too. It's a bad idea to 
require a dump/load to downgrade, but it's also a bad idea to allow a 
/silent/ downgrade. So it's better to bump the format number and tell 
people to change it back (or proide a script to do so) if they want to 
downgrade. Bumping the format number will also prevent unintentional use 
of older (say, statically linked) binaries with a new repository.

-- Brane



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Erik Huelsmann <eh...@gmail.com>.
On Sat, 20 Nov 2004 00:27:19 -0500, Greg Hudson <gh...@mit.edu> wrote:
> On Fri, 2004-11-19 at 22:20, Garrett Rooney wrote:
> >   Otherwise it seems like we can never bump a repository or working copy
> > format in 1.x, which seems kind of extreme to me.
> 
> I think the language is pretty clear that we're allowed to bump the
> repository format during a 1.x series, but that doesn't mean it's a good
> idea.
> 
> We know that forcing a dump and load for a downgrade will cause pain in
> some number of situations, including some situations where people never
> even considered using locking.  Unless we think it's really bad if a
> lock is circumvented because someone accessed the repository with 1.1
> server code, I think we should leave the version alone.

Well, yes, I think it is bad that people can use different binaries
against the repository and circumvent the locks.

With respect to downgrading the repository: I don't think the other
tables change their layout (are they allowed to?), meaning that an
upgrade will consist of:

- <create new tables>
- echo 4 > format

Then can't we provide a downgrade script to do the reverse? No
dump/load will be necessary, just as we promised. (This should make it
into the faq even before it is implemented, I guess.)


bye,


Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-11-19 at 22:20, Garrett Rooney wrote:
>   Otherwise it seems like we can never bump a repository or working copy 
> format in 1.x, which seems kind of extreme to me.

I think the language is pretty clear that we're allowed to bump the
repository format during a 1.x series, but that doesn't mean it's a good
idea.

We know that forcing a dump and load for a downgrade will cause pain in
some number of situations, including some situations where people never
even considered using locking.  Unless we think it's really bad if a
lock is circumvented because someone accessed the repository with 1.1
server code, I think we should leave the version alone.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
kfogel@collab.net wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
> 
>>Umm, I was under the impression that we only supported downgrading to
>>an earlier patch release, not an earlier minor release...  Correct me
>>if I'm wrong...
> 
> 
> I took a look in HACKING, and it's unclear on this point:
> 
>  > 2. Working copy and repository formats are backward- and
>  >    forward-compatible for all patch releases in the same minor
>  >    series.  They are backward-compatible for all minor releases in
>  >    the same major series; however, a minor release is allowed to make
>  >    a working copy or repository that doesn't work with previous minor
>  >    releases, where "make" could mean "upgrade" as well as "create".
> 
> 
> The phrase "They are backward-compatible for all minor releases in the
> same major series" seems to indicated that they're, well, backward
> compatible for all minor releases in the same major series.
> 
> But then the next phrase carves out an exception so huge as to
> practically eliminate the original rule.  (I think I wrote this
> language, too, sigh.)
> 
> In this particular case, we should be compatible if we can -- and it's
> easy to be compatible, so the question is easily resolved.
> 
> But I wonder what the heck that language in HACKING really means?

I always assumed the 'backwards and forwards compatible' wording meant 
something similar for working copy and repos format as it did for adding 
functions.  We can add a function in a new minor rev because we don't 
support using code linked against that with an earlier version of the 
libraries.  Since we don't allow you to roll back in that case, I had 
assumed we didn't have to allow it with working copies and repositories. 
  Otherwise it seems like we can never bump a repository or working copy 
format in 1.x, which seems kind of extreme to me.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by kf...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
> --On Friday, November 19, 2004 7:59 PM -0600 kfogel@collab.net wrote:
> 
> > I took a look in HACKING, and it's unclear on this point:
> >
> >  > 2. Working copy and repository formats are backward- and
> >  >    forward-compatible for all patch releases in the same minor
> >  >    series.  They are backward-compatible for all minor releases in
> >  >    the same major series; however, a minor release is allowed to make
> >  >    a working copy or repository that doesn't work with previous minor
> >  >    releases, where "make" could mean "upgrade" as well as "create".
> >
> >
> > The phrase "They are backward-compatible for all minor releases in the
> > same major series" seems to indicated that they're, well, backward
> > compatible for all minor releases in the same major series.
> 
> I think you probably meant 'forward-compatible' - that makes much more
> sense to me.  -- justin

Yes, that's it.  I'll fix.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Friday, November 19, 2004 7:59 PM -0600 kfogel@collab.net wrote:

> I took a look in HACKING, and it's unclear on this point:
>
>  > 2. Working copy and repository formats are backward- and
>  >    forward-compatible for all patch releases in the same minor
>  >    series.  They are backward-compatible for all minor releases in
>  >    the same major series; however, a minor release is allowed to make
>  >    a working copy or repository that doesn't work with previous minor
>  >    releases, where "make" could mean "upgrade" as well as "create".
>
>
> The phrase "They are backward-compatible for all minor releases in the
> same major series" seems to indicated that they're, well, backward
> compatible for all minor releases in the same major series.

I think you probably meant 'forward-compatible' - that makes much more sense 
to me.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by kf...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> Umm, I was under the impression that we only supported downgrading to
> an earlier patch release, not an earlier minor release...  Correct me
> if I'm wrong...

I took a look in HACKING, and it's unclear on this point:

 > 2. Working copy and repository formats are backward- and
 >    forward-compatible for all patch releases in the same minor
 >    series.  They are backward-compatible for all minor releases in
 >    the same major series; however, a minor release is allowed to make
 >    a working copy or repository that doesn't work with previous minor
 >    releases, where "make" could mean "upgrade" as well as "create".


The phrase "They are backward-compatible for all minor releases in the
same major series" seems to indicated that they're, well, backward
compatible for all minor releases in the same major series.

But then the next phrase carves out an exception so huge as to
practically eliminate the original rule.  (I think I wrote this
language, too, sigh.)

In this particular case, we should be compatible if we can -- and it's
easy to be compatible, so the question is easily resolved.

But I wonder what the heck that language in HACKING really means?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
kfogel@collab.net wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
> 
>>If our promise is that you can switch back and forth between 1.0 and
>>1.1 server versions on the same repos without badness, then yes, it
>>breaks them.  Once the 1.1 code touches the repos, it will
>>soft-upgrade to the next format number, which will then cause the 1.0
>>code to error out.
> 
> 
> People should be able to downgrade from 1.2 to 1.1 and continue to use
> the same repository.  So 
> 
>    1) create the new tables on the fly ("magically")
>    2) don't bump the fs format
> 
> That does it, right?  Old server code won't ever access the new
> tables, so they're harmless to 1.1.x and below.
> 

Umm, I was under the impression that we only supported downgrading to an 
earlier patch release, not an earlier minor release...  Correct me if 
I'm wrong...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> If our promise is that you can switch back and forth between 1.0 and
> 1.1 server versions on the same repos without badness, then yes, it
> breaks them.  Once the 1.1 code touches the repos, it will
> soft-upgrade to the next format number, which will then cause the 1.0
> code to error out.

People should be able to downgrade from 1.2 to 1.1 and continue to use
the same repository.  So 

   1) create the new tables on the fly ("magically")
   2) don't bump the fs format

That does it, right?  Old server code won't ever access the new
tables, so they're harmless to 1.1.x and below.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:

> We have a standing promise that "no dump/loads will be necessary until
> 2.0".  That means no fs schema changes.

No, that means no schema changes that cause the repository to be
incompatible with older versions of code.

> 1.  I seem to recall that when we added the 'uuids' table, there was
> some magic code that instantly created the table if not present.  Do
> we need to repeat that technique?

Yes.  1.1 will create the tables if they don't exist, and use them.
1.0 will simply ignore their existance.

> 2.  Are we allowed to increment the 'format' file?  

There's no need.  If done right, we can always pretend that the
lock-nodes/lock-tokens tables were always part of the current format.
There just wasn't code to create or use them. :-)

> I'd certainly like to.  Otherwise, a process using libsvn_fs 1.1 can
> create a lock, but then a process using libsvn_fs 1.0 would silently
> ignore the lock without realizing it.  Does incrementing 'format'
> break our compatibility promises?

If our promise is that you can switch back and forth between 1.0 and
1.1 server versions on the same repos without badness, then yes, it
breaks them.  Once the 1.1 code touches the repos, it will
soft-upgrade to the next format number, which will then cause the 1.0
code to error out.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Locking: repos upgrades?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2004-11-19 at 12:28, Ben Collins-Sussman wrote:
> 2.  Are we allowed to increment the 'format' file?  I'd certainly like 
> to.  Otherwise, a process using libsvn_fs 1.1 can create a lock, but 
> then a process using libsvn_fs 1.0 would silently ignore the lock 
> without realizing it.  Does incrementing 'format' break our 
> compatibility promises?

I think the cost of a downgrade silently ignoring locks is lower than
the cost of forcing a dump/load in order to downgrade.

Also, the repository format file isn't very meaningful any more.  You'll
need to introduce an FS-specific format file if you want to do an
FS-specific format bump.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org