summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_daemon.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2010-06-09 14:17:35 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2010-06-09 14:37:16 +1000
commitfa618aa66ae16660c53c2600eaae074854533d65 (patch)
treeadf91644d98a6a2c6eacac395269c556e69fc1f1 /ctdb/server/ctdb_daemon.c
parentf6446adde31d36ec5b177ff31a384f6a8d75595d (diff)
downloadsamba-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.c17
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"));