repl_meta_data: Remove handling of backlinks from replmd_prepare_commit()
authorAndrew Bartlett <abartlet@samba.org>
Wed, 22 Feb 2017 02:46:18 +0000 (15:46 +1300)
committerGarming Sam <garming@samba.org>
Mon, 27 Feb 2017 06:12:02 +0000 (07:12 +0100)
commit3c557abc84efaaf00e33dbb661cde2b90ce04be2
tree98ec12b2d712adcb1f4e42a028e1f5ea8e4086ee
parent7dbc5bbd60b1c0f32366ad5373ed13aee17f7050
repl_meta_data: Remove handling of backlinks from replmd_prepare_commit()

This deferred handling was already removed, for performance, from
everything but the add case.

We now remove the normal local add case (an originating update), eg
LDAP add from the transaction commit and insted do it on the ADD
operation callback (replmd_op_callback()).

To keep things simple, we make up the extended DN with the GUID and
SID as the object does not actually exist in the DB at the time we
prepare backlink.  This also allows us to avoid another search in the
(much more common) modify case.

We rely on transactions to clean up the add of the object if the
backlink fails, thankfully unlike in replication replmd_add() is
normally the only operation in a transaction, and we have alredy
confirmed the link target exists during get_parsed_dns().

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Feb 27 07:12:02 CET 2017 on sn-devel-144
source4/dsdb/samdb/ldb_modules/repl_meta_data.c