Fix some extra bugs and it seems now it is even able to trim the journal

This commit is contained in:
Vitaliy Filippov
2019-11-22 12:08:44 +03:00
parent 7e87290fca
commit 82a2b8e7d9
5 changed files with 40 additions and 18 deletions
+10 -2
View File
@@ -126,7 +126,7 @@ void blockstore::handle_stable_event(ring_data_t *data, blockstore_operation *op
auto dirty_it = dirty_db.find(*v);
if (dirty_it != dirty_db.end())
{
do
while (1)
{
if (dirty_it->second.state == ST_J_SYNCED)
{
@@ -140,8 +140,16 @@ void blockstore::handle_stable_event(ring_data_t *data, blockstore_operation *op
{
break;
}
if (dirty_it == dirty_db.begin())
{
break;
}
dirty_it--;
} while (dirty_it != dirty_db.begin() && dirty_it->first.oid == v->oid);
if (dirty_it->first.oid != v->oid)
{
break;
}
}
flusher->queue_flush(*v);
}
}