From 5282a60c8fa50db6fff957673dbd73ec1c22a59a Mon Sep 17 00:00:00 2001 From: Jianyu Li Date: Fri, 5 Jan 2018 00:54:30 +0800 Subject: [PATCH] Avoid the assert failure when the inode for the cap_export from other MDS happened not in MDCache Signed-off-by: Jianyu Li (cherry picked from commit 82b9b838ae0bd17247f6296f9d7001331f50663c) --- src/mds/MDCache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 298799f0d9529..60045cb1600d5 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -4322,7 +4322,7 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak) for (auto p = weak->cap_exports.begin(); p != weak->cap_exports.end(); ++p) { CInode *in = get_inode(p->first); - assert(in && in->is_auth()); + assert(!in || in->is_auth()); // note for (auto q = p->second.begin(); q != p->second.end(); ++q) { dout(10) << " claiming cap import " << p->first << " client." << q->first << dendl; -- 2.39.5