diff options
author | Mohit Agrawal <moagrawa@redhat.com> | 2018-05-18 20:03:32 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-05-25 07:15:23 +0000 |
commit | 4ae7f0714b809cfebb64f6e5b5a70664e17a7a56 (patch) | |
tree | 4a6af53597432fd1dc1306197f691b0a0d6c0d37 /xlators/features/changelog/src/changelog-rpc-common.c | |
parent | 44d62baed46a41752b5379bc4095c0a8e20de32f (diff) |
changelog: fix br-state-check.t failure for brick_mux
Problem: Sometime br-state-check.t crash while runnning
for brick multiplex and command in test case is
taking 2 minutes for detach a brick
Solution: Update code in changelog xlator specific to wait
on all connection before cleanup rpc threads and
cleanup rpc object only in non brick mux scenario
BUG: 1577672
Change-Id: I16e257c1e127744a815000b87bd8b7b8d9c51e1b
fixes: bz#1577672
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-rpc-common.c')
-rw-r--r-- | xlators/features/changelog/src/changelog-rpc-common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/changelog/src/changelog-rpc-common.c b/xlators/features/changelog/src/changelog-rpc-common.c index 1745f218b08..056519232cf 100644 --- a/xlators/features/changelog/src/changelog-rpc-common.c +++ b/xlators/features/changelog/src/changelog-rpc-common.c @@ -280,7 +280,12 @@ changelog_rpc_server_destroy (xlator_t *this, rpcsvc_t *rpc, char *sockfile, rpc->rxpool = NULL; } - GF_FREE (rpc); + /* TODO Avoid freeing rpc object in case of brick multiplex + after freeing rpc object svc->rpclock corrupted and it takes + more time to detach a brick + */ + if (!this->cleanup_starting) + GF_FREE (rpc); } rpcsvc_t * |