Rev 704: make some specific cases of the non-dmaster bug non-fatal
in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Fri Jan 4 22:32:29 GMT 2008
------------------------------------------------------------
revno: 704
revision-id:tridge at samba.org-20080104223229-zke9l0r9nc5mecyy
parent: tridge at samba.org-20080104223143-d9nqp6nylf8u72hs
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.kantana
timestamp: Sat 2008-01-05 09:32:29 +1100
message:
make some specific cases of the non-dmaster bug non-fatal
modified:
server/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
=== modified file 'server/ctdb_call.c'
--- a/server/ctdb_call.c 2007-09-04 00:47:02 +0000
+++ b/server/ctdb_call.c 2008-01-04 22:32:29 +0000
@@ -322,11 +322,22 @@
/* its a protocol error if the sending node is not the current dmaster */
if (header.dmaster != hdr->srcnode) {
- DEBUG(0,("pnn %u dmaster request non-master %u dmaster=%u key %08x dbid 0x%08x gen=%u curgen=%u\n",
- ctdb->pnn, hdr->srcnode, header.dmaster, ctdb_hash(&key),
- ctdb_db->db_id, hdr->generation, ctdb->vnn_map->generation));
- ctdb_fatal(ctdb, "ctdb_req_dmaster from non-master");
- return;
+ DEBUG(0,("pnn %u dmaster request for new-dmaster %u from non-master %u real-dmaster=%u key %08x dbid 0x%08x gen=%u curgen=%u c->rsn=%llu header.rsn=%llu reqid=%u keyval=0x%08x\n",
+ ctdb->pnn, c->dmaster, hdr->srcnode, header.dmaster, ctdb_hash(&key),
+ ctdb_db->db_id, hdr->generation, ctdb->vnn_map->generation,
+ (unsigned long long)c->rsn, (unsigned long long)header.rsn, c->hdr.reqid,
+ (key.dsize >= 4)?(*(uint32_t *)key.dptr):0));
+ if (header.rsn != 0 || header.dmaster != ctdb->pnn) {
+ ctdb_fatal(ctdb, "ctdb_req_dmaster from non-master");
+ return;
+ }
+ }
+
+ if (header.rsn > c->rsn) {
+ DEBUG(0,("pnn %u dmaster request with older RSN new-dmaster %u from %u real-dmaster=%u key %08x dbid 0x%08x gen=%u curgen=%u c->rsn=%llu header.rsn=%llu reqid=%u\n",
+ ctdb->pnn, c->dmaster, hdr->srcnode, header.dmaster, ctdb_hash(&key),
+ ctdb_db->db_id, hdr->generation, ctdb->vnn_map->generation,
+ (unsigned long long)c->rsn, (unsigned long long)header.rsn, c->hdr.reqid));
}
/* use the rsn from the sending node */
More information about the samba-cvs
mailing list