use CTDB_CONTROL_TRANS2_COMMIT_RETRY to prevent the counter getting
authorAndrew Tridgell <tridge@samba.org>
Fri, 8 Aug 2008 03:12:16 +0000 (13:12 +1000)
committerMichael Adam <obnox@samba.org>
Wed, 13 Aug 2008 09:54:11 +0000 (11:54 +0200)
out of sync
(This used to be commit 571ec7893c8b40959c005d510c039e3f231ffc67)

source3/lib/dbwrap_ctdb.c

index 8261e2f7330463f07f59442ce2c1dfaaa8818ceb..049e1b9584d8e814d94423ca62938a76a450ed3d 100644 (file)
@@ -646,8 +646,9 @@ again:
 
        /* tell ctdbd to commit to the other nodes */
        rets = ctdbd_control_local(messaging_ctdbd_connection(), 
-                                 CTDB_CONTROL_TRANS2_COMMIT, h->ctx->db_id, 0,
-                                 db_ctdb_marshall_finish(h->m_write), NULL, NULL, &status);
+                                  retries==0?CTDB_CONTROL_TRANS2_COMMIT:CTDB_CONTROL_TRANS2_COMMIT_RETRY, 
+                                  h->ctx->db_id, 0,
+                                  db_ctdb_marshall_finish(h->m_write), NULL, NULL, &status);
        if (!NT_STATUS_IS_OK(rets) || status != 0) {
                tdb_transaction_cancel(h->ctx->wtdb->tdb);
                sleep(1);