server: add positive debug statements to trans2_commit and trans2_finished
authorMichael Adam <obnox@samba.org>
Thu, 29 Oct 2009 12:53:44 +0000 (13:53 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 29 Oct 2009 22:23:29 +0000 (09:23 +1100)
When the operation completed / started successfully.

Michael

server/ctdb_persistent.c

index 66a3f7229b6b8394562a526e9585b8fa98b209f8..c011d97fc63e477550737ce82f2af4feb18aef62 100644 (file)
@@ -163,6 +163,9 @@ int32_t ctdb_control_trans2_commit(struct ctdb_context *ctdb,
                client->num_persistent_updates++;
                ctdb_db->transaction_active = true;
                client->db_id = m->db_id;
+               DEBUG(DEBUG_DEBUG, (__location__ " client id[0x%08x] started to"
+                                 " commit transaction on db id[0x%08x]\n",
+                                 client->client_id, client->db_id));
                break;
        case CTDB_CONTROL_TRANS2_COMMIT_RETRY:
                /* already updated from the first commit */
@@ -172,6 +175,10 @@ int32_t ctdb_control_trans2_commit(struct ctdb_context *ctdb,
                                         "\n", client->db_id, m->db_id));
                        return -1;
                }
+               DEBUG(DEBUG_DEBUG, (__location__ " client id[0x%08x] started "
+                                   "transaction commit retry on "
+                                   "db_id[0x%08x]\n",
+                                   client->client_id, client->db_id));
                break;
        }
 
@@ -563,6 +570,10 @@ int32_t ctdb_control_trans2_finished(struct ctdb_context *ctdb,
        }
        client->num_persistent_updates--;
 
+       DEBUG(DEBUG_DEBUG, (__location__ " client id[0x%08x] finished "
+                           "transaction commit db_id[0x%08x]\n",
+                           client->client_id, ctdb_db->db_id));
+
        return 0;
 }