Browse Source

Fix listings sending too many parallel requests to OSDs, fix rm-data crashing with --wait-list

lrc-matrix
Vitaliy Filippov 6 months ago
parent
commit
4a531d7b8b
  1. 3
      src/cli_rm_data.cpp
  2. 30
      src/cluster_client_list.cpp

3
src/cli_rm_data.cpp

@ -64,8 +64,9 @@ struct rm_inode_t
}
rm->obj_pos = rm->objects.begin();
lists.push_back(rm);
if (parent->list_first)
if (parent->list_first && !(status & INODE_LIST_DONE))
{
// The listing object is dead when DONE => don't call next()
parent->cli->list_inode_next(lister, 1);
}
if (status & INODE_LIST_DONE)

30
src/cluster_client_list.cpp

@ -153,16 +153,6 @@ void cluster_client_t::continue_listing(inode_list_t *lst)
{
if (lst->done_pgs >= lst->pgs.size())
{
// All done
for (int i = 0; i < lists.size(); i++)
{
if (lists[i] == lst)
{
lists.erase(lists.begin()+i, lists.begin()+i+1);
break;
}
}
delete lst;
return;
}
if (lst->want <= 0)
@ -178,7 +168,7 @@ void cluster_client_t::continue_listing(inode_list_t *lst)
send_list(&lst->pgs[i]->list_osds[j]);
if (lst->want <= 0)
{
break;
return;
}
}
}
@ -268,6 +258,24 @@ void cluster_client_t::send_list(inode_list_osd_t *cur_list)
lst->callback(lst, std::move(pg->objects), pg->pg_num, pg->cur_primary, status);
lst->pgs[pg->pos] = NULL;
delete pg;
if (lst->done_pgs >= lst->pgs.size())
{
// All done
for (int i = 0; i < lists.size(); i++)
{
if (lists[i] == lst)
{
lists.erase(lists.begin()+i, lists.begin()+i+1);
break;
}
}
delete lst;
return;
}
}
else
{
lst->want++;
}
continue_listing(lst);
};

Loading…
Cancel
Save