Implement immediate commit mode

This commit is contained in:
Vitaliy Filippov
2020-03-10 01:59:15 +03:00
parent c3737ae3ff
commit 3f522c66e6
8 changed files with 211 additions and 74 deletions
+2 -2
View File
@@ -558,7 +558,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
.version = je->big_write.version,
};
bs->dirty_db.emplace(ov, (dirty_entry){
.state = ST_D_META_SYNCED,
.state = ST_D_SYNCED,
.flags = 0,
.location = je->big_write.location,
.offset = je->big_write.offset,
@@ -595,7 +595,7 @@ int blockstore_init_journal::handle_journal_part(void *buf, uint64_t done_pos, u
{
while (1)
{
it->second.state = (it->second.state == ST_D_META_SYNCED
it->second.state = (it->second.state == ST_D_SYNCED
? ST_D_STABLE
: (it->second.state == ST_DEL_SYNCED ? ST_DEL_STABLE : ST_J_STABLE));
if (it == bs->dirty_db.begin())