1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00
Rusty Russell 3d82f786ec ntdb: fix database corruption when transaction doesn't change anything.
ntdb's transaction code has an optimization which tdb's doesnt: it
only writes the parts of blocks whose contents have changed.  This
means we can actually have a transaction which turns out to need no
recovery region.

This breaks the recovery setup logic, which sets the current recovery
size to 0 if there's no recovery area, and assumes that we'll always
create a new recovery area since the recovery will always need > 0
bytes.

In fact, if we really haven't changed anything, we can skip the
transaction commit altogether: since this happens at least once with
Samba, it's worth doing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-20 05:31:19 +01:00
..
2012-06-19 05:38:06 +02:00
2012-06-19 05:38:07 +02:00
2012-06-19 05:38:07 +02:00
2012-06-19 05:38:06 +02:00
2012-10-08 04:43:36 +02:00
2012-06-19 07:31:06 +02:00
2012-06-19 05:38:06 +02:00
2012-06-19 05:38:06 +02:00
2012-06-19 05:38:06 +02:00
2012-06-19 05:38:07 +02:00
2012-06-19 05:38:07 +02:00