diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-06-09 14:17:35 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2010-06-09 14:37:16 +1000 |
commit | fa618aa66ae16660c53c2600eaae074854533d65 (patch) | |
tree | adf91644d98a6a2c6eacac395269c556e69fc1f1 /ctdb/server/ctdb_daemon.c | |
parent | f6446adde31d36ec5b177ff31a384f6a8d75595d (diff) | |
download | samba-fa618aa66ae16660c53c2600eaae074854533d65.tar.gz samba-fa618aa66ae16660c53c2600eaae074854533d65.tar.xz samba-fa618aa66ae16660c53c2600eaae074854533d65.zip |
add additional logging when tdb_chainunlock() fails
so we can see where it was called from when it fails
(This used to be ctdb commit 0c091b3db6bdefd371787d87bc749593ea8e3c76)
Diffstat (limited to 'ctdb/server/ctdb_daemon.c')
-rw-r--r-- | ctdb/server/ctdb_daemon.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 39fb4edd61d..0a57a8af29b 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -401,7 +401,11 @@ static void daemon_request_call_from_client(struct ctdb_client *client, dstate = talloc(client, struct daemon_call_state); if (dstate == NULL) { - ctdb_ltdb_unlock(ctdb_db, key); + ret = ctdb_ltdb_unlock(ctdb_db, key); + if (ret != 0) { + DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret)); + } + DEBUG(DEBUG_ERR,(__location__ " Unable to allocate dstate\n")); if (client->ctdb->statistics.pending_calls > 0) { ctdb->statistics.pending_calls--; @@ -415,7 +419,11 @@ static void daemon_request_call_from_client(struct ctdb_client *client, call = dstate->call = talloc_zero(dstate, struct ctdb_call); if (call == NULL) { - ctdb_ltdb_unlock(ctdb_db, key); + ret = ctdb_ltdb_unlock(ctdb_db, key); + if (ret != 0) { + DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret)); + } + DEBUG(DEBUG_ERR,(__location__ " Unable to allocate call\n")); if (client->ctdb->statistics.pending_calls > 0) { ctdb->statistics.pending_calls--; @@ -436,7 +444,10 @@ static void daemon_request_call_from_client(struct ctdb_client *client, state = ctdb_daemon_call_send_remote(ctdb_db, call, &header); } - ctdb_ltdb_unlock(ctdb_db, key); + ret = ctdb_ltdb_unlock(ctdb_db, key); + if (ret != 0) { + DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret)); + } if (state == NULL) { DEBUG(DEBUG_ERR,(__location__ " Unable to setup call send\n")); |