tdb: tdb_repack() only when it's worthwhile.
commite8e04158b6990673a8f3534f50d8864069f17f91
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 18 Apr 2011 12:45:11 +0000 (18 22:15 +0930)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Apr 2011 18:08:39 +0000 (26 20:08 +0200)
treef88c2bc12d4f9505c66a7e807c525dd30c1d0462
parentbeacde8a0ce6b6f4f91f8be4aa604694b2e1ff7e
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)
(cherry picked from commit 51761dbcb07f98168ede2fc54be633d4ecee69a2)
lib/tdb/common/transaction.c