From a6900e829484435c5bd5d8efe38490cab54ac442 Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Wed, 8 Aug 2018 08:17:28 +0530 Subject: 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 --- libglusterfs/src/xlator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs') 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, -- cgit