diff options
author | Christof Schmitt <christof.schmitt@us.ibm.com> | 2012-08-30 13:16:24 -0700 |
---|---|---|
committer | Christian Ambach <ambi@samba.org> | 2012-08-31 11:10:14 +0200 |
commit | 424492a96358dd52b8cc48ec26b25b97ae809e57 (patch) | |
tree | 393e200e9d6a0cfab838300438f5952239eb81ff | |
parent | 7204dc9708e5f5164dcd9b7cc3fcb2ea27dcd62e (diff) | |
download | samba-424492a96358dd52b8cc48ec26b25b97ae809e57.tar.gz samba-424492a96358dd52b8cc48ec26b25b97ae809e57.tar.bz2 samba-424492a96358dd52b8cc48ec26b25b97ae809e57.zip |
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 <ambi@samba.org>
-rw-r--r-- | source3/lib/dbwrap/dbwrap_ctdb.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index 0a579974e8..6d46586896 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)); } } |