Commit eab739f5 authored by Libor Peltan's avatar Libor Peltan

journal: fix not decrementing zone count if zone missing

parent 9979fa86
......@@ -1717,19 +1717,16 @@ int journal_scrape(journal_t *j)
WALK_LIST(del_one, to_del) {
txn->ret = j->db->db_api->del(txn->txn, (knot_db_val_t *)del_one->d);
}
md_update_journal_count(txn, -1);
if (!EMPTY_LIST(to_del)) {
md_update_journal_count(txn, -1);
}
md_del_last_inserter_zone(txn, j->zone);
txn->ret = j->db->db_api->txn_commit(txn->txn);
}
scrape_end:
WALK_LIST(del_one, to_del) {
free(del_one->d);
}
ptrlist_free(&to_del, NULL);
ptrlist_deep_free(&to_del, NULL);
return txn->ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment