1 addpartial Overlay README
4 This package contains an OpenLDAP overlay called "addpartial" that
5 intercepts add requests, determines if the entry exists, determines what
6 attributes, if any, have changed, and modifies those attributes. If the
7 entry does not exist, the add request falls through and proceeds normally.
8 If the entry exists but no changes have been detected, the client receives
9 LDAP_SUCCESS (I suppose it is debatable what to do in this case, but this is
10 the most clean for my use. The LDAP_SUCCESS lets me know that the entry I
11 sent slapd == the entry already in my slapd DB. Perhaps this behavior
12 should be configurable in the future).
14 When a change is found, the addpartial overlay will replace all values for
15 the attribute (if an attribute does not exist in the new entry but exists
16 in the entry in the slapd DB, a replace will be done with an empty list of
19 Once a modify takes place, the syncprov overlay will properly process the
20 change, provided that addpartial is the first overlay to run. Please see
21 the CAVEATS for more specifics about this.
23 The addpartial overlay makes it easy to replicate full entries to a slapd
24 instance without worrying about the differences between entries or even if
25 the entry exists. Using ldapadd to add entries, the addpartial overlay can
26 compare about 500 records per second. The intent of the addpartial overlay
27 is to make it easy to replicate records from a source that is not an LDAP
28 instance, such as a database. The overlay is also useful in places where it
29 is easier to create full entries rather than comparing an entry with an
30 entry that must be retrieved (with ldapsearch or similar) from an existing
31 slapd DB to find changes.
33 The addpartial overlay has been used in production since August 2004 and has
34 processed millions of records without incident.
37 A Makefile is included, please set your OPENLDAP_SRC directory properly.
40 After compiling the addpartial overlay, add the following to your
45 moduleload /path/to/addpartial-overlay.so
47 # after database directive...
48 # this overlay should be the last overlay in the config file to ensure that
49 # it properly intercepts the add request
55 - In order to ensure that addpartial does what it needs to do, it should be
56 the last overlay configured so it will run before the other overlays.
57 This is especially important if you are using syncrepl, as the modify that
58 addpartial does will muck with the locking that takes place in the
62 Copyright 2004-2010 The OpenLDAP Foundation.
63 Portions Copyright (C) Virginia Tech, David Hawes.
66 Redistribution and use in source and binary forms, with or without
67 modification, are permitted only as authorized by the OpenLDAP
70 A copy of this license is available in file LICENSE in the
71 top-level directory of the distribution or, alternatively, at
72 http://www.OpenLDAP.org/license.html.