diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-06-13 15:32:36 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-06-19 19:56:22 +0200 |
commit | ac4b78848db1dac7e0316653d2cafe3a32990e06 (patch) | |
tree | e69d1f9099553db9516fa4529cc5061b7f4db7c0 /ctdb/server | |
parent | 1548ab99a2ae61315cf38ff982156bb3b9e61ca2 (diff) | |
download | samba-ac4b78848db1dac7e0316653d2cafe3a32990e06.tar.gz |
ctdb-locking: If a record could not be locked, log the key
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Jun 19 19:56:22 CEST 2017 on sn-devel-144
Diffstat (limited to 'ctdb/server')
-rw-r--r-- | ctdb/server/ctdb_lock.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c index d54e0ceae5e..2644fcd6f5f 100644 --- a/ctdb/server/ctdb_lock.c +++ b/ctdb/server/ctdb_lock.c @@ -520,6 +520,7 @@ static void ctdb_lock_timeout_handler(struct tevent_context *ev, pid_t pid; double elapsed_time; bool skip; + char *keystr; lock_ctx = talloc_get_type_abort(private_data, struct lock_context); ctdb = lock_ctx->ctdb; @@ -542,9 +543,14 @@ static void ctdb_lock_timeout_handler(struct tevent_context *ev, goto skip_lock_debug; } + keystr = hex_encode_talloc(lock_ctx, lock_ctx->key.dptr, + lock_ctx->key.dsize); DEBUG(DEBUG_WARNING, - ("Unable to get RECORD lock on database %s for %.0lf seconds\n", - lock_ctx->ctdb_db->db_name, elapsed_time)); + ("Unable to get RECORD lock on database %s for %.0lf seconds" + " (key %s)\n", + lock_ctx->ctdb_db->db_name, elapsed_time, + keystr ? keystr : "")); + TALLOC_FREE(keystr); /* If a node stopped/banned, don't spam the logs */ if (ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_INACTIVE) { |