Sync all OS-buffered writes to disk. Note that this does **not** write outstanding records to disk. Use [`Self::flush_and_sync`] or call [`Self::flush`] prior to this method to ensure all data is on disk. Returns the maximum transaction offset which is considered durable after this method returns successfully. The offset is `None` if the log hasn't been flushed to disk yet. # Panics This metho
(&self)
| 270 | /// |
| 271 | /// This method panics if syncing fails irrecoverably. |
| 272 | pub fn sync(&self) -> Option<u64> { |
| 273 | let mut inner = self.inner.write().unwrap(); |
| 274 | trace!("sync commitlog"); |
| 275 | inner.sync(); |
| 276 | |
| 277 | inner.max_committed_offset() |
| 278 | } |
| 279 | |
| 280 | /// Write all outstanding transaction records to disk. |
| 281 | /// |