diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-02-28 15:27:24 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-29 02:16:07 -0800 |
commit | 15141a7660b1e4430513c8a96a498da652023894 (patch) | |
tree | 0b746448054fd04d5d6c20c6e3543d3a496d58a2 | |
parent | ca8e61069b4fec42efa76da2070d362607770bc7 (diff) |
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 <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/2831
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Mohammed Junaid <junaid@redhat.com>
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index e1bcd4e1c55..c8064ac83dd 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"); |