forked from vitalif/vitastor
Do not use unordered_map for list_ops/list_results
parent
c696a82083
commit
5335c8de8e
|
@ -220,8 +220,7 @@ void osd_t::start_pg_peering(pg_t & pg)
|
|||
{
|
||||
// Discard the result after completion, which, chances are, will be unsuccessful
|
||||
discard_list_subop(it->second);
|
||||
pg.peering_state->list_ops.erase(it);
|
||||
it = pg.peering_state->list_ops.begin();
|
||||
pg.peering_state->list_ops.erase(it++);
|
||||
}
|
||||
else
|
||||
it++;
|
||||
|
@ -234,8 +233,7 @@ void osd_t::start_pg_peering(pg_t & pg)
|
|||
{
|
||||
free(it->second.buf);
|
||||
}
|
||||
pg.peering_state->list_results.erase(it);
|
||||
it = pg.peering_state->list_results.begin();
|
||||
pg.peering_state->list_results.erase(it++);
|
||||
}
|
||||
else
|
||||
it++;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) Vitaliy Filippov, 2019+
|
||||
// License: VNPL-1.0 (see README.md for details)
|
||||
|
||||
#include <unordered_map>
|
||||
#include "osd_peering_pg.h"
|
||||
|
||||
struct obj_ver_role
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// License: VNPL-1.0 (see README.md for details)
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -45,8 +44,8 @@ struct osd_op_t;
|
|||
struct pg_peering_state_t
|
||||
{
|
||||
// osd_num -> list result
|
||||
std::unordered_map<osd_num_t, osd_op_t*> list_ops;
|
||||
std::unordered_map<osd_num_t, pg_list_result_t> list_results;
|
||||
std::map<osd_num_t, osd_op_t*> list_ops;
|
||||
std::map<osd_num_t, pg_list_result_t> list_results;
|
||||
pool_id_t pool_id = 0;
|
||||
pg_num_t pg_num = 0;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue