From: Christof Schmitt Date: Thu, 30 Aug 2012 20:16:24 +0000 (-0700) Subject: s3:dbwrap_ctdb: Add DB name and key to warning message X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=424492a96358dd52b8cc48ec26b25b97ae809e57;p=obnox%2Fsamba%2Fsamba-obnox.git s3:dbwrap_ctdb: Add DB name and key to warning message When a operation takes too long, it is useful for debugging to know the DB and the key. Signed-off-by: Christian Ambach --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 0a579974e85..6d46586896b 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -996,7 +996,14 @@ static int db_ctdb_record_destr(struct db_record* data) if (threshold != 0) { double timediff = timeval_elapsed(&crec->lock_time); if ((timediff * 1000) > threshold) { - DEBUG(0, ("Held tdb lock %f seconds\n", timediff)); + const char *key; + + key = hex_encode_talloc(data, + (unsigned char *)data->key.dptr, + data->key.dsize); + DEBUG(0, ("Held tdb lock on db %s, key %s %f seconds\n", + tdb_name(crec->ctdb_ctx->wtdb->tdb), key, + timediff)); } }