mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
Quick check of LOCK_ID() return. Likely should retry... but not forever.
This commit is contained in:
parent
9fc4a749dc
commit
e1536926b7
servers/slapd/back-bdb
@ -70,8 +70,13 @@ bdb_attribute(
|
||||
if ( txn != NULL ) {
|
||||
locker = TXN_ID ( txn );
|
||||
} else {
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID ( bdb->bi_dbenv, &locker );
|
||||
rc = LOCK_ID ( bdb->bi_dbenv, &locker );
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
}
|
||||
|
||||
if (target != NULL && dn_match(&target->e_nname, entry_ndn)) {
|
||||
|
@ -49,8 +49,15 @@ bdb_bind(
|
||||
Debug( LDAP_DEBUG_ARGS, "==> bdb_bind: dn: %s\n", dn->bv_val, 0, 0);
|
||||
#endif
|
||||
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID(bdb->bi_dbenv, &locker);
|
||||
rc = LOCK_ID(bdb->bi_dbenv, &locker);
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
send_ldap_result( conn, op, rc=LDAP_OTHER,
|
||||
NULL, "internal error", NULL, NULL );
|
||||
return rc;
|
||||
}
|
||||
|
||||
dn2entry_retry:
|
||||
/* get entry */
|
||||
|
@ -34,8 +34,15 @@ bdb_compare(
|
||||
u_int32_t locker;
|
||||
DB_LOCK lock;
|
||||
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID ( bdb->bi_dbenv, &locker );
|
||||
rc = LOCK_ID(bdb->bi_dbenv, &locker);
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
send_ldap_result( conn, op, rc=LDAP_OTHER,
|
||||
NULL, "internal error", NULL, NULL );
|
||||
return rc;
|
||||
}
|
||||
|
||||
dn2entry_retry:
|
||||
/* get entry */
|
||||
|
@ -82,8 +82,13 @@ bdb_group(
|
||||
if ( txn ) {
|
||||
locker = TXN_ID( txn );
|
||||
} else {
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID ( bdb->bi_dbenv, &locker );
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (dn_match(&target->e_name, gr_ndn)) {
|
||||
|
@ -39,8 +39,13 @@ bdb_referrals(
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID ( bdb->bi_dbenv, &locker );
|
||||
rc = LOCK_ID(bdb->bi_dbenv, &locker);
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
return LDAP_OTHER;
|
||||
}
|
||||
|
||||
dn2entry_retry:
|
||||
/* get entry */
|
||||
|
@ -71,8 +71,15 @@ bdb_search(
|
||||
|
||||
manageDSAit = get_manageDSAit( op );
|
||||
|
||||
/* XXYYZ: need to check return value */
|
||||
LOCK_ID (bdb->bi_dbenv, &locker );
|
||||
rc = LOCK_ID (bdb->bi_dbenv, &locker );
|
||||
switch(rc) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
send_ldap_result( conn, op, rc=LDAP_OTHER,
|
||||
NULL, "internal error", NULL, NULL );
|
||||
return rc;
|
||||
}
|
||||
|
||||
if ( nbase->bv_len == 0 ) {
|
||||
/* DIT root special case */
|
||||
|
Loading…
Reference in New Issue
Block a user