From ca40a6bfb6de625da1483185cc53afcf5d758e27 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sat, 20 Mar 2021 13:10:54 -0700 Subject: [PATCH] add docs for fs backend multi-writer support --- rust/src/storage/file/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/rust/src/storage/file/mod.rs b/rust/src/storage/file/mod.rs index dd91afcc23..401a209645 100644 --- a/rust/src/storage/file/mod.rs +++ b/rust/src/storage/file/mod.rs @@ -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,