Menu

Commit [r374]  Maximize  Restore  History

Resolve issue #1573: Move deltification out of the commit process.

Move post-commit deltification out of the commit process, exposing a
new public interface for the task. We make use of the new interface
in 'svnadmin load', deltifying each new revision after it is created,
because if you load a huge repository, and then deltify after the
operation is completely, Berkeley DB may never recover the extra space
used by the undeltified data.

I run 'svnadmin load' using a dumpfile of the first 5599 revisions of
the Subversion repository, and without deltification after each commit
was made. Then I used 'svnadmin deltify -r1:HEAD' on the database.
The combined clock-times for these operations was 160 minutes. The
combined logfile generation was 970 logfiles. The size of the
'strings' table after it was all said and done was 456 Megabytes --
which was exactly the same size it was *before* I ran the standalone
deltification. After the deltification, db_stat reported that I had
91,000 free pages in my 'strings' table.

Then I made 'svnadmin load' do the post-revision-creation
deltification, and re-ran my test (of course, this time without the
extra 'svnadmin deltify' command). Clock-time was 165 minutes.
Logfile generation, 970 logfiles. But the 'strings' table size was a
shockingly mere 80 Megabytes -- and db_stat reported only 110 free
pages.

The moral of the story: to keep your repository small, deltify early
and often.

* subversion/include/svn_fs.h
(svn_fs_deltify_revision): New.

* subversion/libsvn_fs/tree.c
(svn_fs_commit_txn): No longer perform post-commit predecessor
deltification.
(struct rev_get_txn_id_args): New baton.
(txn_body_rev_get_txn_id, svn_fs_deltify_revision): New functions.

* subversion/svnadmin/main.c
Sort subcommand function prototypes in alphabetical order, and add
one for svnadmin_deltify.
(cmd_table): Add 'deltify' subcommand ... again.
(subcommand_deltify): New (sorta).

* subversion/libsvn_repos/load.c
(close_revision): Explicitly deltify predecessors of paths changed
in each revision of the repository load.

* subversion/tests/libsvn_fs/fs-test.c
(file_integrity_helper): Deltify after each revision, because these
tests were written long ago partially to address problems that
occured during deltification.

* subversion/libsvn_repos/repos.c
(create_hooks): Add a call to 'svnadmin deltify' in the post-commit
hook template.

* doc/book/TODO
Add a TODO note about fixing the book with respect to deltification
stuffs.

cmpilato 2003-11-11

changed /trunk/src/book/TODO
/trunk/src/book/TODO Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.