]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
More for batched writes
authorHoward Chu <hyc@openldap.org>
Sun, 30 Aug 2015 04:46:01 +0000 (05:46 +0100)
committerHoward Chu <hyc@openldap.org>
Sun, 30 Aug 2015 04:46:01 +0000 (05:46 +0100)
Only usable if backend supports txns

servers/slapd/syncrepl.c

index fff7bf54181950abec241e0263f86bfd2c0b3a75..dff0087e4660f73cd798c7bd898bb843e41b828d 100644 (file)
@@ -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 );