summaryrefslogtreecommitdiffstats
path: root/source3/lib
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-05-13 18:20:43 +0200
committerVolker Lendecke <vl@samba.org>2014-01-16 09:18:45 +0100
commitef239302ed8e190fe8cb5cee1a4791f7a9959980 (patch)
tree4a866165216d56e25465e818f0e87e4d6b292c56 /source3/lib
parent63a8f7e4419dd2bb80675f9e11ed2f473317db01 (diff)
downloadsamba-ef239302ed8e190fe8cb5cee1a4791f7a9959980.tar.gz
samba-ef239302ed8e190fe8cb5cee1a4791f7a9959980.tar.xz
samba-ef239302ed8e190fe8cb5cee1a4791f7a9959980.zip
s3:dbwrap include the hashchain in the logs
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 7bc1e47666..3db26900dc 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1163,12 +1163,21 @@ again:
if ((migrate_attempts > lp_parm_int(-1, "ctdb", "migrate_attempts", 10)) ||
(duration_msecs > lp_parm_int(-1, "ctdb", "migrate_duration", 5000))) {
- DEBUG(0, ("db_ctdb_fetch_locked for %s key %s needed %d "
- "attempts, %d milliseconds, chainlock: %d ms, "
- "CTDB %d ms\n", tdb_name(ctx->wtdb->tdb),
+ int chain = 0;
+
+ if (tdb_get_flags(ctx->wtdb->tdb) & TDB_INCOMPATIBLE_HASH) {
+ chain = tdb_jenkins_hash(&key) %
+ tdb_hash_size(ctx->wtdb->tdb);
+ }
+
+ DEBUG(0, ("db_ctdb_fetch_locked for %s key %s, chain %d "
+ "needed %d attempts, %d milliseconds, "
+ "chainlock: %d ms, CTDB %d ms\n",
+ tdb_name(ctx->wtdb->tdb),
hex_encode_talloc(talloc_tos(),
(unsigned char *)key.dptr,
key.dsize),
+ chain,
migrate_attempts, duration_msecs,
(int) chainlock_time * 1000,
(int) ctdb_time * 1000));