From: Howard Chu Date: Sun, 30 Aug 2015 04:46:01 +0000 (+0100) Subject: More for batched writes X-Git-Tag: OPENLDAP_REL_ENG_2_5_0ALPHA~137^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bea2c5d4382742d6074345f10e15bcb30f2c6bb0;p=thirdparty%2Fopenldap.git More for batched writes Only usable if backend supports txns --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index fff7bf5418..dff0087e46 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2978,10 +2978,12 @@ syncrepl_entry( si->si_refreshCount = 0; si->si_refreshTxn = NULL; } - if ( !si->si_refreshCount ) { - op->o_bd->bd_info->bi_op_txn( op, SLAP_TXN_BEGIN, &si->si_refreshTxn ); + if ( op->o_bd->bd_info->bi_op_txn ) { + if ( !si->si_refreshCount ) { + op->o_bd->bd_info->bi_op_txn( op, SLAP_TXN_BEGIN, &si->si_refreshTxn ); + } + si->si_refreshCount++; } - si->si_refreshCount++; } slap_op_time( &op->o_time, &op->o_tincr );