summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_call.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-03-21 13:03:01 +1030
committerRonnie Sahlberg <sahlberg@lenovo-laptop.(none)>2011-03-21 13:57:40 +1100
commit435dad05cbb6d7f5149a24766145bd243145262a (patch)
tree51d38fe87aea8e48d8d76d342b4955befb27451b /ctdb/server/ctdb_call.c
parentcee8c4be94b290318ba921e129292791bf846010 (diff)
downloadsamba-435dad05cbb6d7f5149a24766145bd243145262a.tar.gz
samba-435dad05cbb6d7f5149a24766145bd243145262a.tar.xz
samba-435dad05cbb6d7f5149a24766145bd243145262a.zip
ctdbd: fix lock held on error ("ctdb_req_dmaster from non-master.")
We should release the lock on the record before returning; otherwise the recovery (which tries to freeze the database) will fail. Symptoms are as follows: ctdbd: pnn 15 dmaster request for new-dmaster 19 from non-master 1 real-dmaster=5 key f049c3c8 dbid 0x6cf2837d gen=1148812532 curgen=1148812532 c->rsn=2 header.rsn=15 reqid=2147483585 keyval=0x4f464e49 ctdbd: ctdb_req_dmaster from non-master. Force a recovery. ... ctdbd: freeze_lock-1:server/ctdb_freeze.c:55 Failed to lock database registry.tdb CQ:1022545 (This used to be ctdb commit 38b2dbe0605816742e74e2b8a811eaba99c7e12d)
Diffstat (limited to 'ctdb/server/ctdb_call.c')
-rw-r--r--ctdb/server/ctdb_call.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index 73072c3f75..0ea76bf44f 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -421,6 +421,7 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
DEBUG(DEBUG_ERR,("ctdb_req_dmaster from non-master. Force a recovery.\n"));
ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;
+ ctdb_ltdb_unlock(ctdb_db, key);
return;
}
}