/* can we find group entry */
rc = bdb_dn2entry_r( be, txn, gr_ndn, &e, NULL, 0, locker, &lock );
if( rc ) {
- if ( rc == DB_LOCK_DEADLOCK || rc == DB_LOCK_NOTGRANTED )
- goto dn2entry_retry;
boi->boi_err = rc;
+ if ( rc == DB_LOCK_DEADLOCK || rc == DB_LOCK_NOTGRANTED ) {
+ if ( txn ) {
+ /* must let owning txn abort, but our result
+ * is still inconclusive, so don't let it
+ * get cached.
+ */
+ op->o_do_not_cache = 1;
+ return( 1 );
+ }
+ ldap_pvt_thread_yield();
+ goto dn2entry_retry;
+ }
if ( free_lock_id ) {
LOCK_ID_FREE ( bdb->bi_dbenv, locker );
}
rc = TXN_ABORT( ltid );
ltid = NULL;
op->o_private = NULL;
+ op->o_do_not_cache = opinfo.boi_acl_cache;
if( rc != 0 ) {
rc = LDAP_OTHER;
text = "internal error";
opinfo.boi_txn = ltid;
opinfo.boi_locker = locker;
opinfo.boi_err = 0;
+ opinfo.boi_acl_cache = op->o_do_not_cache;
op->o_private = &opinfo;
/* get entry */
rc = access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE, NULL );
+ switch( opinfo.boi_err ) {
+ case DB_LOCK_DEADLOCK:
+ case DB_LOCK_NOTGRANTED:
+ goto retry;
+ }
+
if ( ! rc ) {
rc = LDAP_INSUFFICIENT_ACCESS;
#ifdef NEW_LOGGING
rc = access_allowed( be, conn, op, p,
children, NULL, ACL_WRITE, NULL );
+ switch( opinfo.boi_err ) {
+ case DB_LOCK_DEADLOCK:
+ case DB_LOCK_NOTGRANTED:
+ goto retry;
+ }
+
p = NULL;
if ( ! rc ) {
rc = access_allowed( be, conn, op, np, children,
NULL, ACL_WRITE, NULL );
+ switch( opinfo.boi_err ) {
+ case DB_LOCK_DEADLOCK:
+ case DB_LOCK_NOTGRANTED:
+ goto retry;
+ }
+
if( ! rc ) {
#ifdef NEW_LOGGING
LDAP_LOG ( OPERATION, DETAIL1,
rc = access_allowed( be, conn, op, np,
children, NULL, ACL_WRITE, NULL );
+ switch( opinfo.boi_err ) {
+ case DB_LOCK_DEADLOCK:
+ case DB_LOCK_NOTGRANTED:
+ goto retry;
+ }
+
np = NULL;
if ( ! rc ) {