There has tracked some history slow ops, when `num_slow_ops` is greater than
`osd_op_history_slow_op_size`, the tracked fastest op should be deleted.
In some case, the `fastest_historic_op` has refcount >= 2, the func `put_historic`
decrease `fastest_historic_op's` refcount and still remain `fastest_historic_op`
in `historic_registry`, `fastest_historic_op's` refcount will be decreased more
than once in func `put_historic`, leading to `fastest_historic_op` be deleted ahead.
So we need erase the `fastest_historic_op` from `historic_registry`.
Signed-off-by: luo rixin <luorixin@huawei.com>
assert(fastest_historic_iter != std::end(historic_registry));
const auto& fastest_historic_op =
static_cast<const ClientRequest&>(*fastest_historic_iter);
+ historic_registry.erase(fastest_historic_iter);
// clear a previously "leaked" op
ClientRequest::ICRef(&fastest_historic_op, /* add_ref= */false);
--num_slow_ops;