From 91e1c7eb7c00c610e941aa46a2419087cb1b7bf3 Mon Sep 17 00:00:00 2001 From: Ethan Donowitz Date: Mon, 23 Oct 2023 14:14:46 -0400 Subject: [PATCH] set submod branch to main and add docs --- librocksdb-sys/rocksdb | 2 +- src/db.rs | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/librocksdb-sys/rocksdb b/librocksdb-sys/rocksdb index 6b7168ea4..5b4c37e67 160000 --- a/librocksdb-sys/rocksdb +++ b/librocksdb-sys/rocksdb @@ -1 +1 @@ -Subproject commit 6b7168ea4e4858b54dd86f5681c85a45983ba840 +Subproject commit 5b4c37e67666008004bfe87fc7bb009756c64527 diff --git a/src/db.rs b/src/db.rs index 1dd0554f6..91423e1af 100644 --- a/src/db.rs +++ b/src/db.rs @@ -886,7 +886,15 @@ impl DBCommon { 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()));