Skip to content

Commit

Permalink
add docs for fs backend multi-writer support
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingping Hou authored and houqp committed Mar 21, 2021
1 parent 52ee3a3 commit ca40a6b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions rust/src/storage/file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,19 @@ use uuid::Uuid;

mod rename;

/// NOTE: The file storage backend is not multi-writer safe in Windows due to lack of support for
/// native atomic file rename system call.
/// Multi-writer support for different platforms:
///
/// * Modern Linux kernels are well supported. However because Linux implementation leverages
/// `RENAME_NOREPLACE`, older versions of the kernel might not work depending on what filesystem is
/// being used:
/// * ext4 requires >= Linux 3.15
/// * btrfs, shmem, and cif requires >= Linux 3.17
/// * xfs requires >= Linux 4.0
/// * ext2, minix, reiserfs, jfs, vfat, and bpf requires >= Linux 4.9
/// * Darwin is supported but not fully tested.
/// * Windows is not supported because we are not using native atomic file rename system call.
/// Patches welcome.
/// * Support for other platforms are not implemented at the moment.
#[derive(Default, Debug)]
pub struct FileStorageBackend {
root: String,
Expand Down

0 comments on commit ca40a6b

Please sign in to comment.