tdb: tdb_repack() only when it's worthwhile.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Apr 2011 12:45:11 +0000 (22:15 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Apr 2011 12:45:11 +0000 (22:15 +0930)
commit094ab60053bcc0bc3542af8144e394d83270053e
tree4a9a447f5ac9457a755381beef2137ae11073fbc
parent6aa72dae8fc341de5b497f831ded1f8f519fa8fb
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>
lib/tdb/common/transaction.c