Replace assert(this_it == cur_op) with if() for the case of PG repeering
parent
165c204555
commit
46e111272f
|
@ -293,15 +293,16 @@ resume_7:
|
||||||
// Continue other write operations to the same object
|
// Continue other write operations to the same object
|
||||||
auto next_it = pg.write_queue.find(oid);
|
auto next_it = pg.write_queue.find(oid);
|
||||||
auto this_it = next_it;
|
auto this_it = next_it;
|
||||||
assert(this_it->second == cur_op);
|
if (this_it != pg.write_queue.end() && this_it->second == cur_op)
|
||||||
|
{
|
||||||
next_it++;
|
next_it++;
|
||||||
pg.write_queue.erase(this_it);
|
pg.write_queue.erase(this_it);
|
||||||
if (next_it != pg.write_queue.end() &&
|
if (next_it != pg.write_queue.end() && next_it->first == oid)
|
||||||
next_it->first == oid)
|
|
||||||
{
|
{
|
||||||
osd_op_t *next_op = next_it->second;
|
osd_op_t *next_op = next_it->second;
|
||||||
continue_primary_write(next_op);
|
continue_primary_write(next_op);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool osd_t::finalize_primary_write(osd_op_t *cur_op, pg_t & pg, pg_osd_set_t & loc_set, int base_state)
|
bool osd_t::finalize_primary_write(osd_op_t *cur_op, pg_t & pg, pg_osd_set_t & loc_set, int base_state)
|
||||||
|
@ -661,6 +662,8 @@ resume_7:
|
||||||
// Continue other write operations to the same object
|
// Continue other write operations to the same object
|
||||||
auto next_it = pg.write_queue.find(oid);
|
auto next_it = pg.write_queue.find(oid);
|
||||||
auto this_it = next_it;
|
auto this_it = next_it;
|
||||||
|
if (this_it != pg.write_queue.end() && this_it->second == cur_op)
|
||||||
|
{
|
||||||
next_it++;
|
next_it++;
|
||||||
pg.write_queue.erase(this_it);
|
pg.write_queue.erase(this_it);
|
||||||
if (next_it != pg.write_queue.end() &&
|
if (next_it != pg.write_queue.end() &&
|
||||||
|
@ -669,4 +672,5 @@ resume_7:
|
||||||
osd_op_t *next_op = next_it->second;
|
osd_op_t *next_op = next_it->second;
|
||||||
continue_primary_write(next_op);
|
continue_primary_write(next_op);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue