Merge pull request #15973 from majianpeng/bluefs-async-compact-log

os/bluestore/BlueFS: clear current log entrys before dump all fnode,

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-07-08 21:29:59 -05:00 committed by GitHub
commit 91e5d5bc20

View File

@ -1211,6 +1211,8 @@ void BlueFS::_compact_log_async(std::unique_lock<std::mutex>& l)
// 2. prepare compacted log
bluefs_transaction_t t;
//avoid record two times in log_t and _compact_log_dump_metadata.
log_t.clear();
_compact_log_dump_metadata(&t);
// conservative estimate for final encoded size