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",
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;
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;
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");