traverse: Pass reqid and srcnode information to local database traverse
authorAmitay Isaacs <amitay@gmail.com>
Thu, 6 Jun 2013 06:12:07 +0000 (16:12 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 10 Jul 2013 04:33:19 +0000 (14:33 +1000)
So that traverse child process can directly send the TRAVERSE_DATA control to
the srcnode without first sending it to local node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
server/ctdb_traverse.c

index 8d8a51776a18dfb77d8065c1d01794a80a5cbd20..b5dd82227a9c0d9597f5355922b273c34bed8d57 100644 (file)
@@ -38,6 +38,8 @@ struct ctdb_traverse_local_handle {
        pid_t child;
        uint64_t srvid;
        uint32_t client_reqid;
+       uint32_t reqid;
+       int srcnode;
        void *private_data;
        ctdb_traverse_fn_t callback;
        struct timeval start_time;
@@ -169,7 +171,9 @@ static struct ctdb_traverse_local_handle *ctdb_traverse_local(struct ctdb_db_con
        h->private_data = all_state;
        h->ctdb_db = ctdb_db;
        h->client_reqid = all_state->client_reqid;
+       h->reqid = all_state->reqid;
        h->srvid = all_state->srvid;
+       h->srcnode = all_state->srcnode;
        h->withemptyrecords = all_state->withemptyrecords;
 
        if (h->child == 0) {