ITS#7710 fix for non-replicated internal ops

Their completion was making slap_graduate_commit_csn() cleanup
their parent op's CSN, thus preventing that CSN from propagating
to any consumers.
This commit is contained in:
Howard Chu 2013-10-09 04:58:37 -07:00
parent c82dcab9bd
commit c350b51a63
2 changed files with 8 additions and 0 deletions

View file

@ -341,6 +341,7 @@ memberof_value_modify(
memberof_t *mo = (memberof_t *)on->on_bi.bi_private; memberof_t *mo = (memberof_t *)on->on_bi.bi_private;
Operation op2 = *op; Operation op2 = *op;
unsigned long opid = op->o_opid;
SlapReply rs2 = { REP_RESULT }; SlapReply rs2 = { REP_RESULT };
slap_callback cb = { NULL, slap_null_cb, NULL, NULL }; slap_callback cb = { NULL, slap_null_cb, NULL, NULL };
Modifications mod[ 2 ] = { { { 0 } } }, *ml; Modifications mod[ 2 ] = { { { 0 } } }, *ml;
@ -358,6 +359,7 @@ memberof_value_modify(
op2.orm_modlist = NULL; op2.orm_modlist = NULL;
/* Internal ops, never replicate these */ /* Internal ops, never replicate these */
op2.o_opid = 0; /* shared with op, saved above */
op2.orm_no_opattrs = 1; op2.orm_no_opattrs = 1;
op2.o_dont_replicate = 1; op2.o_dont_replicate = 1;
@ -472,6 +474,8 @@ memberof_value_modify(
slap_mods_free( ml, 1 ); slap_mods_free( ml, 1 );
} }
} }
/* restore original opid */
op->o_opid = opid;
/* FIXME: if old_group_ndn doesn't exist, both delete __and__ /* FIXME: if old_group_ndn doesn't exist, both delete __and__
* add will fail; better split in two operations, although * add will fail; better split in two operations, although

View file

@ -527,6 +527,7 @@ refint_repair(
dependent_data *dp; dependent_data *dp;
SlapReply rs = {REP_RESULT}; SlapReply rs = {REP_RESULT};
Operation op2; Operation op2;
unsigned long opid;
int rc; int rc;
op->o_callback->sc_response = refint_search_cb; op->o_callback->sc_response = refint_search_cb;
@ -565,6 +566,7 @@ refint_repair(
* *
*/ */
opid = op2.o_opid;
op2 = *op; op2 = *op;
for ( dp = rq->attrs; dp; dp = dp->next ) { for ( dp = rq->attrs; dp; dp = dp->next ) {
SlapReply rs2 = {REP_RESULT}; SlapReply rs2 = {REP_RESULT};
@ -587,6 +589,7 @@ refint_repair(
/* Internal ops, never replicate these */ /* Internal ops, never replicate these */
op2.orm_no_opattrs = 1; op2.orm_no_opattrs = 1;
op2.o_dont_replicate = 1; op2.o_dont_replicate = 1;
op2.o_opid = 0;
/* Set our ModifiersName */ /* Set our ModifiersName */
if ( SLAP_LASTMOD( op->o_bd ) ) { if ( SLAP_LASTMOD( op->o_bd ) ) {
@ -686,6 +689,7 @@ refint_repair(
op2.o_tmpfree( m, op2.o_tmpmemctx ); op2.o_tmpfree( m, op2.o_tmpmemctx );
} }
} }
op2.o_opid = opid;
return 0; return 0;
} }