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

How to migrate to Single DB per WC

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 06 Jul 2010 20:24:23 +0100

I've started looking at moving to a single DB per WC, and written some
notes in 'notes/wc-ng/single-db-per-wc'. I haven't looked into the
current state of the code yet, other than building it (success) and
running it (50% of tests pass, which isn't bad, considering).

Any comments on this "how to upgrade the DB tables" part (copied from
that document)?


Upgrade: Migration of DB tables from subdir DBs to root DB

"Move into root's table" means move each row into the same table in the WC
root's DB, and we expect no duplicates.

"Merge into root's table" means we move the row into the root's table,
unless a row that's identical apart from its id is already present, in which
case we use the existing row's id.


  Merge into root's table, which may result in assigning new id's.
  Change all repos id's accordingly in the other tables being migrated:
    # and in tree conflict info?

  Note: I already have two repos id's in some parts of some of my svn
  working copies, so this is not purely theoretical.


  Merge into root's table;
    theoretically we should assign new id's and change them where they
    appear in other tables, but in practice the id is always 1 so we can
    just assert that.


  Move into root's table;
    omit if .kind == subdir
    change .local_relpath
    set .parent_relpath


  Move into root's table;
    omit if .kind == subdir (?)
    change .local_relpath
    set .parent_relpath


  Move into root's table;
    change .local_relpath
    set .parent_relpath

  Move into root's table.


  Move into root's table.
  Move the corresponding pristine text files into root's 'pristine' dir.
  Change root's pristine directory to sharded (or this could be a
    separate upgrade).


  Move into root's table;
    change .local_dir_relpath


  Ensure WORK_QUEUE is empty.


- Julian
Received on 2010-07-06 21:25:08 CEST

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