If the monitor sends rejoin mdsmap twice just before the first time
hasn't finished yet, it may run identify_files_to_recover() twice.
Since the rejoin_recover_q and rejoin_check_q were vector so there
could be duplicated inodes.
Fixes: https://tracker.ceph.com/issues/53741
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
d82bdd8e4255585512a963c87c8300be8dc26420)
{
dout(10) << "identify_files_to_recover" << dendl;
int count = 0;
+
+ // Clear the recover and check queues in case the monitor sends rejoin mdsmap twice.
+ rejoin_recover_q.clear();
+ rejoin_check_q.clear();
+
for (auto &p : inode_map) {
CInode *in = p.second;
if (!in->is_auth())