HomeStore
HomeStore copied to clipboard
fix logstore recovery issue
the recovery issue is caused by the logdev metablk recovery callback rollback_super_blk_found
, it will put all the log dev to m_unopened_logdev
, which will be destroyed when logservice start.
in this pr :
1 change the logic about m_unopened_logdev
to make sure only those log devs which are not opened before logservice#start will be destroyed.
2 change the metablk dependency , so that rollback_super_blk_found
will be called after all the log dev metablk are recovered
3 add logic to make sure the logstore of a repldev is ready before it is going to join raft group. now , we use a future to open logstore, so there might be a small case that logstore is not ready when repldev is joining raft group