dbwrap_ctdb: treat empty records in ltdb as non-existing
commit8620c56e3d8df5412aa63ce391b61ec5de2964dd
authorRalph Boehme <slow@samba.org>
Mon, 8 Aug 2016 14:58:51 +0000 (8 16:58 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Aug 2016 10:42:51 +0000 (10 12:42 +0200)
tree45c5038ffc0ba15199aa27f42bac5fe1b675fd45
parent8f6b83dd81a5b665810709b1cf9c5e323e4d4252
dbwrap_ctdb: treat empty records in ltdb as non-existing

When fetching records from remote ctdb nodes via ctdbd_parse() or in
db_ctdb_traverse(), we already check for tombstone records and skip
them. This was originally also done for the ltdb checks.

See also bug: https://bugzilla.samba.org/show_bug.cgi?id=10008
(commit 1cae59ce112ccb51b45357a52b902f80fce1eef1).

Commit 925625b52886d40b50fc631bad8bdc81970f7598 reverted part of the
patch of bug 10008 due to a deadlock it introduced.

This patch re-introduces the consistent treatment of empty records in
the ltdb but avoids the deadlock by correctly signalling
NT_STATUS_NOT_FOUND if an empty record is found authoritatively in
the ltdb and not calling ctdb in this case.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12005

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Aug  9 04:38:44 CEST 2016 on sn-devel-144

(backported from commit 25df582739918b7afd4e5497eaffe279e2d92cd1)

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Wed Aug 10 12:42:51 CEST 2016 on sn-devel-144
source3/lib/dbwrap/dbwrap_ctdb.c