cd48bbd Trac Ticket #351 - use betxn plugins by default

Authored and Committed by nhosoi 7 years ago
31 files changed. 2303 lines added. 1719 lines removed.
ldap/ldif/50replication-plugins.ldif
file modified
+1 -0
ldap/ldif/template-dse.ldif.in
file modified
+10 -8
ldap/ldif/template-pampta.ldif.in
file modified
+1 -1
ldap/servers/plugins/cos/cos.c
file modified
+21 -89
ldap/servers/plugins/cos/cos_cache.c
file modified
+17 -58
ldap/servers/plugins/cos/cos_cache.h
file modified
+1 -0
ldap/servers/plugins/memberof/memberof.c
file modified
+42 -4
ldap/servers/plugins/pam_passthru/pam_passthru.h
file modified
+1 -0
ldap/servers/plugins/pam_passthru/pam_ptpreop.c
file modified
+138 -52
ldap/servers/plugins/referint/referint.c
file modified
+53 -12
ldap/servers/plugins/replication/repl5.h
file modified
+10 -1
ldap/servers/plugins/replication/repl5_init.c
file modified
+156 -22
ldap/servers/plugins/replication/repl5_plugins.c
file modified
+147 -8
ldap/servers/plugins/replication/repl5_replica.c
file modified
+1 -1
ldap/servers/plugins/replication/repl_extop.c
file modified
+1 -0
ldap/servers/plugins/roles/roles_plugin.c
file modified
+3 -3
ldap/servers/slapd/back-ldbm/dblayer.c
file modified
+101 -23
ldap/servers/slapd/back-ldbm/idl.c
file modified
+6 -6
ldap/servers/slapd/back-ldbm/idl_new.c
file modified
+26 -19
ldap/servers/slapd/back-ldbm/ldbm_add.c
file modified
+426 -404
ldap/servers/slapd/back-ldbm/ldbm_delete.c
file modified
+333 -296
ldap/servers/slapd/back-ldbm/ldbm_modify.c
file modified
+116 -107
ldap/servers/slapd/back-ldbm/ldbm_modrdn.c
file modified
+550 -541
ldap/servers/slapd/back-ldbm/ldif2ldbm.c
file modified
+11 -11
ldap/servers/slapd/back-ldbm/proto-back-ldbm.h
file modified
+12 -6
ldap/servers/slapd/backend.c
file modified
+28 -0
ldap/servers/slapd/dse.c
file modified
+25 -24
ldap/servers/slapd/entry.c
file modified
+22 -18
ldap/servers/slapd/mapping_tree.c
file modified
+5 -5
ldap/servers/slapd/pblock.c
file modified
+5 -0
ldap/servers/slapd/slapi-plugin.h
file modified
+34 -0
    Trac Ticket #351 - use betxn plugins by default
    
    https://fedorahosted.org/389/ticket/351
    
    Trac Ticket #352 - make cos, roles, views betxn aware
    
    https://fedorahosted.org/389/ticket/352
    
    Fix Description:
    . Enabled betxn by default on the following plugins:
        7-bit check Plugin, Attribute uniqueness Plugin
        Auto Membership Plugin, Managed Entries, MemberOf Plugin
        Multimaster Replication Plugin, PAM Pass Through Auth Plugin
        Referential integrity postoperation Plugin
        Roles Plugin, State Change Plugin, USN Plugin
    . Exposed backend transaction to plugins:
        slapi_back_transaction_begin|commit|abort.
    . Backend serial lock is held just before the backend transaction
      in the dblayer_txn_begin function and released after it is
      committed or aborted in dblayer_txn_commit or abort, respectively.
      The transaction begin call has to be before "finding" the backend
      entry to avoid the deadlock between the serial lock and the
      individual entry cache lock.  Thus the transaction begins earlier
      than this patch.
    . dse: adjusting to the bepost behaviour, put betxn post hook into
      "need_be_postop" clause.
    . Class of Service Plugin:
      + register cos_postop_init as postoperation only (not betxn).
        cos_post_op set in cos_post_init is a wrapper of cos_cache_
        change_notify, which does not have any backend operations.
        Thus, no need to be in transaction.  Rather, if putting it
        in the transaction it could cause a deadlock between change_
        lock and transaction.
    . MemberOf Plugin:
      + If betxn is on, MemberOf post operations are called at the
        betxn postop timing, which is aborted if the main operation
        fails.
      + When betxn is on, member of operations are in the transaction
        as sell as in the backend serial lock.  Taking advantage of it,
        memberof_lock is not held if betxn is on.
      + MemberOf fixup task uses exposed transaction APIs.
    . Multimaster Replication Plugin
      + If betxn is on, Multimaster Replication bepreop operations
        are called at the betxn preop timing and bepost operations are
        called at the betxn postop timing.  Note: since betxn post call-
        backs are already declared, each bepost callback is called from
        the existing betxn post callbacks (see multimaster_be_betxnpostop_*).
    . PAM Pass Through Auth Plugin:
      + If betxn is on, PAM Pass Through pre/post operations are called
        at the betxn preop/postop timing, respectivly.
    . Referential integrity postoperation Plugin
      + If betxn is on, Referential integrity post operations are called
        at the betxn postop timing.
      + When betxn is on, referential integirity post operations are in
        the transaction as sell as in the backend serial lock.  Taking
        advantage of it, referint_lock is not held if betxn is on.
    
    . Miscellaneous
      + cos_cache.h: added '#include "ldaplog.h" and removed copied
        LDAPDebug from cos.c and cos_cache.c.
      + cos_cache.c: added missing CR at the end of some error messages.
      + repl5_replica.c: removed (nscpentrydn=*) from searching tombstone
        entry filter.
      + entry.c: in addition to "true"|"false", "yes"|"no", and digits,
        let slapi_entry_attr_get_bool accept "on"|"off".
      + mapping_tree.c: changed the log level of a warning "Mapping tree
        node entry for "" point to an unknown backend" issued in mtn_get_be
        to BACKLDBM".  This message is logged at the start up time of Class
        of Service plugin from the dse hook, which is benign.
    
        
file modified
+21 -89
file modified
+28 -0
file modified
+25 -24
file modified
+22 -18
file modified
+5 -0