Skip to content

Commit

Permalink
set submod branch to main and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ethowitz committed Oct 23, 2023
1 parent 893eb59 commit 91e1c7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion librocksdb-sys/rocksdb
Submodule rocksdb updated 0 files
10 changes: 9 additions & 1 deletion src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,15 @@ impl<T: ThreadMode, D: DBInner> DBCommon<T, D> {
Ok(())
}

/// Syncs any already-flushed data to disk.
/// Ensure all WAL writes have been synced to storage, so that (assuming OS
/// and hardware support) data will survive power loss. This function does
/// not imply flush_wal, so flush_wal(true) is recommended if using
/// manual_wal_flush=true. Currently only works if allow_mmap_writes = false
/// in Options.
///
/// Note that write() followed by sync_wal() is not exactly the same as write()
/// with sync=true: in the latter case the changes won't be visible until the
/// sync is done.
pub fn sync_wal(&self) -> Result<(), Error> {
unsafe {
ffi_try!(ffi::rocksdb_sync_wal(self.inner.inner()));
Expand Down

0 comments on commit 91e1c7e

Please sign in to comment.