Need to fix retry handling.
goto return_results;;
}
- /* post-read */
- if( op->o_postread ) {
- if ( slap_read_controls( op, rs, op->oq_add.rs_e,
- &slap_post_read_bv, &ctrls[num_ctrls] ) )
- {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, DETAIL1,
- "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
-#endif
- goto return_results;
- }
- ctrls[++num_ctrls] = NULL;
- }
-
/* nested transaction */
rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, ltid, <2,
bdb->bi_db_opflags );
}
}
+ /* post-read */
+ if( op->o_postread ) {
+ if ( slap_read_controls( op, rs, op->oq_add.rs_e,
+ &slap_post_read_bv, &ctrls[num_ctrls] ) )
+ {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "<=- bdb_add: post-read failed!\n", 0, 0, 0 );
+#endif
+ goto return_results;
+ }
+ ctrls[++num_ctrls] = NULL;
+ op->o_postread = 0; /* prevent redo on retry */
+ /* FIXME: should read entry on the last retry */
+ }
+
if ( op->o_noop ) {
if (( rs->sr_err=TXN_ABORT( ltid )) != 0 ) {
rs->sr_text = "txn_abort (no-op) failed";
goto return_results;
}
ctrls[++num_ctrls] = NULL;
+ op->o_preread = 0; /* prevent redo on retry */
+ /* FIXME: should read entry on the last retry */
}
/* nested transaction */
goto return_results;
}
- if( op->o_postread ) {
- if( slap_read_controls( op, rs, e,
- &slap_post_read_bv, &ctrls[num_ctrls] ) )
- {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, DETAIL1,
- "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
-#endif
- goto return_results;
- }
- ctrls[++num_ctrls] = NULL;
- op->o_postread = 0; /* prevent redo on retry */
- /* FIXME: should read entry on the last retry */
- }
-
/* change the entry itself */
rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, &dummy );
if ( rs->sr_err != 0 ) {
}
}
+ if( op->o_postread ) {
+ if( slap_read_controls( op, rs, e,
+ &slap_post_read_bv, &ctrls[num_ctrls] ) )
+ {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "<=- bdb_modify: post-read failed!\n", 0, 0, 0 );
+#endif
+ goto return_results;
+ }
+ ctrls[++num_ctrls] = NULL;
+ op->o_postread = 0; /* prevent redo on retry */
+ /* FIXME: should read entry on the last retry */
+ }
+
if( op->o_noop ) {
if ( ( rs->sr_err = TXN_ABORT( ltid ) ) != 0 ) {
rs->sr_text = "txn_abort (no-op) failed";
}
ctrls[++num_ctrls] = NULL;
op->o_preread = 0; /* prevent redo on retry */
+ /* FIXME: should read entry on the last retry */
}
/* nested transaction */
goto return_results;
}
- if( op->o_postread ) {
- if( slap_read_controls( op, rs, e,
- &slap_post_read_bv, &ctrls[num_ctrls] ) )
- {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, DETAIL1,
- "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
-#else
- Debug( LDAP_DEBUG_TRACE,
- "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
-#endif
- goto return_results;
- }
- ctrls[++num_ctrls] = NULL;
- op->o_postread = 0; /* prevent redo on retry */
- /* FIXME: should read entry on the last retry */
- }
-
/* id2entry index */
rs->sr_err = bdb_id2entry_update( op->o_bd, lt2, e );
if ( rs->sr_err != 0 ) {
}
}
+ if( op->o_postread ) {
+ if( slap_read_controls( op, rs, e,
+ &slap_post_read_bv, &ctrls[num_ctrls] ) )
+ {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, DETAIL1,
+ "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "<=- bdb_modrdn: post-read failed!\n", 0, 0, 0 );
+#endif
+ goto return_results;
+ }
+ ctrls[++num_ctrls] = NULL;
+ op->o_postread = 0; /* prevent redo on retry */
+ /* FIXME: should read entry on the last retry */
+ }
+
if( op->o_noop ) {
if(( rs->sr_err=TXN_ABORT( ltid )) != 0 ) {
rs->sr_text = "txn_abort (no-op) failed";