summaryrefslogtreecommitdiff
path: root/librpc/tools
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-02-17 20:56:34 +1030
committerRusty Russell <rusty@rustcorp.com.au>2013-02-20 05:31:19 +0100
commit3d82f786ecdd6747e90fe480a15de8c3fcea5f7b (patch)
tree4197bb0051b0effbae636d7dc559a433647ee428 /librpc/tools
parent85b6329b91f402da474547410e82438ea2554775 (diff)
downloadsamba-3d82f786ecdd6747e90fe480a15de8c3fcea5f7b.tar.gz
samba-3d82f786ecdd6747e90fe480a15de8c3fcea5f7b.tar.bz2
samba-3d82f786ecdd6747e90fe480a15de8c3fcea5f7b.zip
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>
Diffstat (limited to 'librpc/tools')
0 files changed, 0 insertions, 0 deletions