pub enum StorageSyncMode {
Auto,
Syncfs,
PerFile,
}Expand description
How a pipeline makes its files durable when it commits a checkpoint.
A checkpoint can hold tens of thousands of files, so committing them one at a time is the dominant cost of making one. Both alternatives below fix that, but they suit different deployments.
Variants§
Auto
Use syncfs when storage has a filesystem to itself, and fsync files in
parallel otherwise.
Syncfs
Always syncfs.
One syscall makes the whole filesystem durable, which is the cheapest option by far when storage is a dedicated volume. On a filesystem shared with anything else, it also writes back that other data.
A pipeline falls back to per_file where syncfs cannot report a failed
writeback, rather than honoring this setting: off Linux, and before Linux
5.8, where syncfs returned success and discarded the error.
PerFile
Always fsync each file, spread across several threads.
Slower than syncfs on a dedicated volume, but it touches only this
pipeline’s files.
Trait Implementations§
Source§impl Clone for StorageSyncMode
impl Clone for StorageSyncMode
Source§fn clone(&self) -> StorageSyncMode
fn clone(&self) -> StorageSyncMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StorageSyncMode
Source§impl Debug for StorageSyncMode
impl Debug for StorageSyncMode
Source§impl Default for StorageSyncMode
impl Default for StorageSyncMode
Source§fn default() -> StorageSyncMode
fn default() -> StorageSyncMode
Source§impl<'de> Deserialize<'de> for StorageSyncMode
impl<'de> Deserialize<'de> for StorageSyncMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for StorageSyncMode
Source§impl PartialEq for StorageSyncMode
impl PartialEq for StorageSyncMode
Source§impl Serialize for StorageSyncMode
impl Serialize for StorageSyncMode
impl StructuralPartialEq for StorageSyncMode
Auto Trait Implementations§
impl Freeze for StorageSyncMode
impl RefUnwindSafe for StorageSyncMode
impl Send for StorageSyncMode
impl Sync for StorageSyncMode
impl Unpin for StorageSyncMode
impl UnsafeUnpin for StorageSyncMode
impl UnwindSafe for StorageSyncMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.