You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "D.J. Heap" <dj...@shadyvale.net> on 2005/05/09 03:58:37 UTC
[PATCH] Hotcopy fix
Does this patch look rational? It behaves correctly for me in my testing so
far.
Log:
Fix hotcopy command's handling of the db/format file and the locks table.
In BDB repositories, the format file was never being copied. In FSFS
repositories, the format file was always being copied which would
fail on old repositories where that file did not exist.
Additionally, the locks table was never being copied in FSFS
repositories.
* subversion/libsvn_fs_base/fs.c
(base_hotcopy): Copy the db/format file if it exists.
* subversion/libsvn_fs_fs/fs_fs.c
(copy_locks_table): New function to copy the locks table while holding
the repository write lock.
(svn_fs_fs__hotcopy): Copy the db/format file and locks table if they
exist.
Re: [PATCH] Hotcopy fix
Posted by "C. Michael Pilato" <cm...@collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:
> On May 8, 2005, at 10:58 PM, D.J. Heap wrote:
> >
> > Additionally, the locks table was never being copied in FSFS
> > repositories.
> >
>
> Just a sanity check here:
>
> Is the consensus that lock-data is just 'temporary' repository
> metadata, and therefore it's okay that 'svnadmin dump' doesn't
> preserve it? That was my understanding. A dump is about preserving/
> migrating versioned data only.
>
> Does it matter, therefore, whether 'svnadmin hotcopy' preserves lock-
> data? If the point is to make a backup, I guess one could go either
> way...?
Uncommitted, stale transactions and the nodes which hang off of them
are also arguably "temporary repository metadata" that 'svnadmin dump'
doesn't preserve, and yet we don't bother shaking those suckers out of
hotcopy'd repositories. A hotcopy is a just that, a copy, void of all
knowledge of repository internals, and should therefore assume that
everything in range in copy worthy. Hotcopy should copy the locks
tables.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Hotcopy fix
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Ben Collins-Sussman wrote:
>
> On May 8, 2005, at 10:58 PM, D.J. Heap wrote:
>
>>
>> Additionally, the locks table was never being copied in FSFS
>> repositories.
>>
>
> Just a sanity check here:
>
> Is the consensus that lock-data is just 'temporary' repository
> metadata, and therefore it's okay that 'svnadmin dump' doesn't preserve
> it? That was my understanding. A dump is about preserving/ migrating
> versioned data only.
>
> Does it matter, therefore, whether 'svnadmin hotcopy' preserves lock-
> data? If the point is to make a backup, I guess one could go either
> way...?
I don't know...there were no comments to my earlier post. BDB hotcopy was
already copying the locks tables, though, so I just had FSFS do the same.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Hotcopy fix
Posted by Ben Collins-Sussman <su...@collab.net>.
On May 8, 2005, at 10:58 PM, D.J. Heap wrote:
>
> Additionally, the locks table was never being copied in FSFS
> repositories.
>
Just a sanity check here:
Is the consensus that lock-data is just 'temporary' repository
metadata, and therefore it's okay that 'svnadmin dump' doesn't
preserve it? That was my understanding. A dump is about preserving/
migrating versioned data only.
Does it matter, therefore, whether 'svnadmin hotcopy' preserves lock-
data? If the point is to make a backup, I guess one could go either
way...?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Hotcopy fix
Posted by "D.J. Heap" <dj...@shadyvale.net>.
New version of the patch -- only change is the new test. If there are no
objections I'll commit it in a day or two.
Log:
Fix hotcopy command's handling of the db/format file and the locks table.
In BDB repositories, the format file was never being copied. In FSFS
repositories, the format file was always being copied which would
fail on old repositories where that file did not exist.
Additionally, the locks table was never being copied in FSFS
repositories.
* subversion/libsvn_fs_base/fs.c
(base_hotcopy): Copy the db/format file if it exists.
* subversion/libsvn_fs_fs/fs_fs.c
(copy_locks_table): New function to copy the locks table while holding
the repository write lock.
(svn_fs_fs__hotcopy): Copy the db/format file and locks table if they
exist.
* subversion/tests/clients/cmdline/svnadmin_tests.py
(hotcopy_format): New test.
Re: [PATCH] Hotcopy fix
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Branko Čibej wrote:
[snip]
>
> The patch looks O.K. at first glance (haven't tested it), but could we
> please include tests with such bug fixes?
>
> -- Brane
Yes, I'll add a test and post a new patch if there are no other objections
to this one.
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Hotcopy fix
Posted by Branko Čibej <br...@xbc.nu>.
D.J. Heap wrote:
> Does this patch look rational? It behaves correctly for me in my
> testing so far.
>
> Log:
> Fix hotcopy command's handling of the db/format file and the locks table.
>
> In BDB repositories, the format file was never being copied. In FSFS
> repositories, the format file was always being copied which would
> fail on old repositories where that file did not exist.
>
> Additionally, the locks table was never being copied in FSFS
> repositories.
>
> * subversion/libsvn_fs_base/fs.c
> (base_hotcopy): Copy the db/format file if it exists.
>
> * subversion/libsvn_fs_fs/fs_fs.c
> (copy_locks_table): New function to copy the locks table while holding
> the repository write lock.
> (svn_fs_fs__hotcopy): Copy the db/format file and locks table if they
> exist.
The patch looks O.K. at first glance (haven't tested it), but could we
please include tests with such bug fixes?
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org