Rev 163: merge from ronnie in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Thu Apr 19 02:54:52 GMT 2007


------------------------------------------------------------
revno: 163
revision-id: tridge at samba.org-20070419025451-eaea0b4b18ce3fa5
parent: tridge at samba.org-20070419024319-a841e423b4a13de6
parent: ronniesahlberg at gmail.com-20070419024819-a7dgjgmvsu1n75dx
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Thu 2007-04-19 12:54:51 +1000
message:
  merge from ronnie
modified:
  common/ctdb_daemon.c           ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
  direct/ctdbd_test.c            ctdbd_test.c-20070411085057-17kgjzfktsh28g99-1
    ------------------------------------------------------------
    merged: ronniesahlberg at gmail.com-20070419024819-a7dgjgmvsu1n75dx
    parent: ronniesahlberg at gmail.com-20070419023439-swff506prvebhy7s
    committer: Ronnie sahlberg <ronniesahlberg at gmail.com>
    branch nick: ctdb
    timestamp: Thu 2007-04-19 12:48:19 +1000
    message:
       the checks for srcnode and destnode from the client are redundant since the daemon will sort these out itself before it sends the call of to either the local handler or a remote daemon
=== modified file 'common/ctdb_daemon.c'
--- a/common/ctdb_daemon.c	2007-04-19 02:33:13 +0000
+++ b/common/ctdb_daemon.c	2007-04-19 02:48:19 +0000
@@ -306,18 +306,6 @@
 	struct daemon_call_state *dstate;
 	struct ctdb_call *call;
 
-	/* check that the client filled in the correct vnn for the local node */
-	if (ctdb_get_vnn(client->ctdb) != c->hdr.srcnode) {
-		DEBUG(0, (__location__ "Wrong srcnode in CTDB_REQ_CALL from client  was:%d should be :%d\n", c->hdr.srcnode, ctdb_get_vnn(client->ctdb)));
-		return;
-	}
-
-	/* verify that the destnode makes sense */
-	if (c->hdr.destnode >= client->ctdb->num_nodes) {
-		DEBUG(0, (__location__ "Wrong dstnode in CTDB_REQ_CALL from client  was:%d but there are only %d nodes in the cluster\n", c->hdr.destnode, client->ctdb->num_nodes));
-		return;
-	}
-
 	ctdb_db = find_ctdb_db(client->ctdb, c->db_id);
 	if (!ctdb_db) {
 		DEBUG(0, (__location__ " Unknown database in request. db_id==0x%08x",

=== modified file 'direct/ctdbd_test.c'
--- a/direct/ctdbd_test.c	2007-04-19 02:34:39 +0000
+++ b/direct/ctdbd_test.c	2007-04-19 02:48:19 +0000
@@ -188,7 +188,7 @@
 
    when the daemon has responded   this node should be the dmaster (unless it has migrated off again)
  */
-void fetch_record(int fd, uint32_t db_id, TDB_DATA key, int thisnode, int destnode)
+void fetch_record(int fd, uint32_t db_id, TDB_DATA key)
 {
 	struct ctdb_req_call *req;
 	struct ctdb_reply_call *rep;
@@ -202,8 +202,6 @@
 	req->hdr.ctdb_magic  = CTDB_MAGIC;
 	req->hdr.ctdb_version = CTDB_VERSION;
 	req->hdr.operation   = CTDB_REQ_CALL;
-	req->hdr.destnode    = destnode;
-	req->hdr.srcnode     = thisnode;
 	req->hdr.reqid       = 1;
 
 	req->flags           = CTDB_IMMEDIATE_MIGRATION;
@@ -298,7 +296,7 @@
 	key.dsize=strlen((const char *)(key.dptr));
 	printf("fetch the test key:[%s]\n",key.dptr);
 
-	fetch_record(fd, db_id, key, 0, 1);
+	fetch_record(fd, db_id, key);
 	printf("\n");
 
 



More information about the samba-cvs mailing list