Skip to content

Commit

Permalink
raftstore,util: address some review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Pig Chu <benpichu@gmail.com>
  • Loading branch information
benpigchu committed Jun 6, 2019
1 parent 840a386 commit a6183d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/tikv_util/src/file.rs
Expand Up @@ -202,5 +202,7 @@ mod tests {
fn test_fsync_by_path() {
let tmp_dir = TempDir::new("").unwrap();
fsync_by_path(tmp_dir.path()).unwrap();
let non_existent_file = tmp_dir.join("non_existent_file");
fsync_by_path(tmp_dir.path()).unwrap_err();
}
}
1 change: 1 addition & 0 deletions src/raftstore/store/snap.rs
Expand Up @@ -963,6 +963,7 @@ impl Snapshot for Snap {
fs::rename(&cf_file.tmp_path, &cf_file.path)?;
self.size_track.fetch_add(cf_file.size, Ordering::SeqCst);
}
fsync_by_path(&self.dir_path)?;
// write meta file
let mut v = vec![];
self.meta_file.meta.write_to_vec(&mut v)?;
Expand Down

0 comments on commit a6183d9

Please sign in to comment.