From 15141a7660b1e4430513c8a96a498da652023894 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 28 Feb 2012 15:27:24 +0530 Subject: protocol/client: send unique key to server during handshake utilize the graph->id for making the key unique. Change-Id: I0c1b355aa901af88e65fd12cb9e0535318856867 BUG: 783982 Signed-off-by: Amar Tumballi Reviewed-on: http://review.gluster.com/2831 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Mohammed Junaid --- xlators/protocol/client/src/client-handshake.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index e1bcd4e1c..c8064ac83 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1439,8 +1439,13 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) } } - ret = gf_asprintf (&process_uuid_xl, "%s-%s", this->ctx->process_uuid, - this->name); + /* With multiple graphs possible in the same process, we need a + field to bring the uniqueness. Graph-ID should be enough to get the + job done + */ + ret = gf_asprintf (&process_uuid_xl, "%s-%s-%d", + this->ctx->process_uuid, this->name, + this->graph->id); if (-1 == ret) { gf_log (this->name, GF_LOG_ERROR, "asprintf failed while setting process_uuid"); -- cgit