Skip to content
Snippets Groups Projects
Commit 7537d3d8 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Partial fix for ITS#3188.

As Howard noted, additional fixes may be needed in other update routines.
parent a527174b
Branches
Tags
No related merge requests found
......@@ -794,19 +794,20 @@ bdb_cache_modify(
DB_LOCK *lock )
{
EntryInfo *ei = BEI(e);
int rc = 0;
/* Get write lock on data */
bdb_cache_entry_db_relock( env, locker, ei, 1, 0, lock );
rc = bdb_cache_entry_db_relock( env, locker, ei, 1, 0, lock );
/* If we've done repeated mods on a cached entry, then e_attrs
* is no longer contiguous with the entry, and must be freed.
*/
if ( (void *)e->e_attrs != (void *)(e+1) ) {
attrs_free( e->e_attrs );
if ( ! rc ) {
if ( (void *)e->e_attrs != (void *)(e+1) ) {
attrs_free( e->e_attrs );
}
e->e_attrs = newAttrs;
}
e->e_attrs = newAttrs;
return 0;
return rc;
}
/*
......
......@@ -659,7 +659,12 @@ retry: /* transaction retry */
goto return_results;
}
} else {
bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
rc = bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
switch( rc ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
goto retry;
}
if ( LDAP_STAILQ_EMPTY( &op->o_bd->be_syncinfo )) {
if ( ctxcsn_added ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment