ctrls[num_ctrls] = NULL;
- if ( !SLAP_SHADOW( op->o_bd ))
- slap_mods_opattrs( op, &op->orm_modlist, 1 );
+ slap_mods_opattrs( op, &op->orm_modlist, 1 );
if( 0 ) {
retry: /* transaction retry */
rs->sr_err = SLAPD_ABANDON;
goto return_results;
}
- ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
attrs_free( dummy.e_attrs );
}
send_ldap_result( op, rs );
- if ( !SLAP_SHADOW( op->o_bd ))
- slap_graduate_commit_csn( op );
if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
- ldap_pvt_thread_yield();
TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}
done:
+ slap_graduate_commit_csn( op );
+
if( ltid != NULL ) {
TXN_ABORT( ltid );
}
bdb_unlocked_cache_return_entry_w (&bdb->bi_cache, e);
}
- if( preread_ctrl != NULL ) {
+ if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
}
- if( postread_ctrl != NULL ) {
+ if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
}