diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2018-08-08 08:17:28 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-08-10 17:48:15 +0000 |
commit | a6900e829484435c5bd5d8efe38490cab54ac442 (patch) | |
tree | 02a498e6aac84828f35195f449c81b186a1a01ad | |
parent | 7d4849499663a42ed81e1f9ebc95c82fc70dc4c3 (diff) |
core: Update condition in get_xlator_by_name_or_type
Problem: Sometimes client connection is failed after throwing
error "cleanup flag is set for xlator Try again later".
The situation comes only after get a detach request but
the brick stack is not completely detached and at the same time
the client initiates a connection with brick
Solution: To resolve the same check cleanup_starting flag in get
xlator_by_name_or_type, this function call by server_setvolume
to attach a client with brick.
Change-Id: I3720e42642fe495dd05211e2ed2cb976db9e231b
fixes: bz#1614124
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
-rw-r--r-- | libglusterfs/src/xlator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index f1ed9236f09..b1a79a68bf5 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -629,7 +629,7 @@ get_xlator_by_name_or_type (xlator_t *this, char *target, int is_name) for (trav = this->children; trav; trav = trav->next) { value = is_name ? trav->xlator->name : trav->xlator->type; - if (!strcmp(value, target)) { + if (!strcmp(value, target) && !trav->xlator->cleanup_starting) { return trav->xlator; } child_xl = get_xlator_by_name_or_type (trav->xlator, target, |