tdb: tdb_repack() only when it's worthwhile.
commit51761dbcb07f98168ede2fc54be633d4ecee69a2
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Apr 2011 12:45:11 +0000 (18 22:15 +0930)
committerJeremy Allison <jra@samba.org>
Tue, 19 Apr 2011 17:52:12 +0000 (19 10:52 -0700)
treef6260f560500b73a0ed0568d158c9dec81b4b2d3
parent59cccbf09e53b457bc400edd371e092ed8259acb
tdb: tdb_repack() only when it's worthwhile.

tdb_repack() is expensive and consumes memory, so we can spend some
effort to see if it's worthwhile.  In particular, tdbbackup doesn't
need to repack: it started with an empty database!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(cherry picked from commit 094ab60053bcc0bc3542af8144e394d83270053e)
lib/tdb/common/transaction.c