summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-14 23:47:47 +0200
committerMichael Adam <obnox@samba.org>2011-08-15 17:15:15 +0200
commit7eeb1685237da3867f58504c694d55dcf582b55b (patch)
treea3e0f5b537fc66c6b955d8c15a75b207f07ba833 /source3
parent0aa85ec43a7973836681b5b79b3778bb64cdec00 (diff)
downloadsamba-7eeb1685237da3867f58504c694d55dcf582b55b.tar.gz
samba-7eeb1685237da3867f58504c694d55dcf582b55b.tar.bz2
samba-7eeb1685237da3867f58504c694d55dcf582b55b.zip
s3:dbwrap_ctdb: improve transaction start/commit/cancel debugging
* also log nesting transaction start/commit/cancel * unify transaction log messages slightly
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 454a28399f..ada5cfce9f 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -335,6 +335,8 @@ static int db_ctdb_transaction_start(struct db_context *db)
if (ctx->transaction) {
ctx->transaction->nesting++;
+ DEBUG(5, (__location__ " transaction start on db 0x%08x: nesting %d -> %d\n",
+ ctx->db_id, ctx->transaction->nesting - 1, ctx->transaction->nesting));
return 0;
}
@@ -369,7 +371,7 @@ static int db_ctdb_transaction_start(struct db_context *db)
ctx->transaction = h;
- DEBUG(5,(__location__ " Started transaction on db 0x%08x\n", ctx->db_id));
+ DEBUG(5,(__location__ " transaction started on db 0x%08x\n", ctx->db_id));
return 0;
}
@@ -786,6 +788,8 @@ static int db_ctdb_transaction_commit(struct db_context *db)
if (h->nesting != 0) {
h->nesting--;
+ DEBUG(5, (__location__ " transaction commit on db 0x%08x: nesting %d -> %d\n",
+ ctx->db_id, ctx->transaction->nesting + 1, ctx->transaction->nesting));
return 0;
}
@@ -798,7 +802,7 @@ static int db_ctdb_transaction_commit(struct db_context *db)
goto done;
}
- DEBUG(5,(__location__ " Commit transaction on db 0x%08x\n", ctx->db_id));
+ DEBUG(5,(__location__ " transaction commit on db 0x%08x\n", ctx->db_id));
/*
* As the last db action before committing, bump the database sequence
@@ -891,6 +895,8 @@ static int db_ctdb_transaction_cancel(struct db_context *db)
if (h->nesting != 0) {
h->nesting--;
h->nested_cancel = true;
+ DEBUG(5, (__location__ " transaction cancel on db 0x%08x: nesting %d -> %d\n",
+ ctx->db_id, ctx->transaction->nesting + 1, ctx->transaction->nesting));
return 0;
}