Check whether lox_db is empty after recovering
This commit is contained in:
parent
d8e40b53c4
commit
5ed62d239d
|
@ -51,7 +51,7 @@ impl DB {
|
|||
let (lox_db, context) = match sled::open(db_config.db_path) {
|
||||
Ok(lox_db) => {
|
||||
// Check if the lox_db already exists
|
||||
if lox_db.was_recovered() {
|
||||
if lox_db.was_recovered() && !lox_db.is_empty() {
|
||||
context = read_lox_context_from_db(lox_db.clone(), roll_back_date);
|
||||
context.metrics = metrics;
|
||||
//Otherwise, create a new Lox context
|
||||
|
|
Loading…
Reference in New Issue