]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Revert batched writes experimental code
authorHoward Chu <hyc@openldap.org>
Thu, 13 Dec 2018 14:34:54 +0000 (06:34 -0800)
committerHoward Chu <hyc@openldap.org>
Thu, 13 Dec 2018 14:34:54 +0000 (06:34 -0800)
Reverts
bea2c5d4382742d6074345f10e15bcb30f2c6bb0
535cf92ff44ba06d944eab8939e7e6d8e6b20d18
5a3a54333cc067209bd6aa53fd84a250f7a48b1d
afa9a9c3e019f1525a26d205f6a395b1b7a89577
due to backend deadlocks

servers/slapd/syncrepl.c

index f2c7b857f84361076651351a3baa7eeb8da9fa49..1c80d49ff70b46233b5f2c0eb32665f720a3baf8 100644 (file)
@@ -113,10 +113,6 @@ typedef struct syncinfo_s {
        int                     si_refreshDelete;
        int                     si_refreshPresent;
        int                     si_refreshDone;
-       int                     si_refreshCount;
-       time_t          si_refreshBeg;
-       time_t          si_refreshEnd;
-       OpExtra         *si_refreshTxn;
        int                     si_syncdata;
        int                     si_logstate;
        int                     si_lazyCommit;
@@ -746,10 +742,7 @@ do_syncrep1(
        }
 
        si->si_refreshDone = 0;
-       si->si_refreshBeg = slap_get_time();
-       si->si_refreshCount = 0;
-       si->si_refreshTxn = NULL;
-       Debug( LDAP_DEBUG_ANY, "do_syncrep1: %s starting refresh\n",
+       Debug( LDAP_DEBUG_SYNC, "do_syncrep1: %s starting refresh\n",
                si->si_ridtxt, 0, 0 );
 
        rc = ldap_sync_search( si, op->o_tmpmemctx );
@@ -1205,13 +1198,6 @@ do_syncrep2(
                        {
                                rc = syncrepl_updateCookie( si, op, &syncCookie, 1 );
                        }
-                       if ( si->si_refreshCount ) {
-                               LDAP_SLIST_REMOVE( &op->o_extra, si->si_refreshTxn, OpExtra, oe_next );
-                               op->o_bd->bd_info->bi_op_txn( op, SLAP_TXN_COMMIT, &si->si_refreshTxn );
-                               si->si_refreshCount = 0;
-                               si->si_refreshTxn = NULL;
-                       }
-                       si->si_refreshEnd = slap_get_time();
                        if ( err == LDAP_SUCCESS
                                && si->si_logstate == SYNCLOG_FALLBACK ) {
                                si->si_logstate = SYNCLOG_LOGGING;
@@ -1293,18 +1279,11 @@ do_syncrep2(
                                        {
                                                si->si_refreshDone = 1;
                                        }
+                                       ber_scanf( ber, /*"{"*/ "}" );
                                        if ( si->si_refreshDone ) {
-                                               if ( si->si_refreshCount ) {
-                                                       LDAP_SLIST_REMOVE( &op->o_extra, si->si_refreshTxn, OpExtra, oe_next );
-                                                       op->o_bd->bd_info->bi_op_txn( op, SLAP_TXN_COMMIT, &si->si_refreshTxn );
-                                                       si->si_refreshCount = 0;
-                                                       si->si_refreshTxn = NULL;
-                                               }
-                                               si->si_refreshEnd = slap_get_time();
-       Debug( LDAP_DEBUG_ANY, "do_syncrep1: %s finished refresh\n",
-               si->si_ridtxt, 0, 0 );
+                                               Debug( LDAP_DEBUG_SYNC, "do_syncrep1: %s finished refresh\n",
+                                                       si->si_ridtxt, 0, 0 );
                                        }
-                                       ber_scanf( ber, /*"{"*/ "}" );
                                        if ( abs(si->si_type) == LDAP_SYNC_REFRESH_AND_PERSIST &&
                                                si->si_refreshDone )
                                                tout_p = &tout;
@@ -1434,12 +1413,6 @@ do_syncrep2(
                if ( ldap_pvt_thread_pool_pausing( &connection_pool )) {
                        slap_sync_cookie_free( &syncCookie, 0 );
                        slap_sync_cookie_free( &syncCookie_req, 0 );
-                       if ( si->si_refreshCount ) {
-                               LDAP_SLIST_REMOVE( &op->o_extra, si->si_refreshTxn, OpExtra, oe_next );
-                               op->o_bd->bd_info->bi_op_txn( op, SLAP_TXN_COMMIT, &si->si_refreshTxn );
-                               si->si_refreshCount = 0;
-                               si->si_refreshTxn = NULL;
-                       }
                        return SYNC_PAUSED;
                }
        }