Skip to content

Commit

Permalink
fix sync error
Browse files Browse the repository at this point in the history
Signed-off-by: GanZiheng <ganziheng98@gmail.com>
  • Loading branch information
GanZiheng committed Jun 27, 2022
1 parent 94fd3a8 commit be369c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@ impl LevelsControllerInner {
new_tables.append(&mut table?);
}

util::sync_dir(&self.opts.dir)?;
// To avoid error in memory mode with heavy workload.
if !self.opts.in_memory {
util::sync_dir(&self.opts.dir)?;
}

new_tables.sort_by(|x, y| COMPARATOR.compare_key(x.biggest(), y.biggest()));

Expand Down

0 comments on commit be369c4

Please sign in to comment.