From d265b7d647bdec7b4ceda1f261c8671394f40f37 Mon Sep 17 00:00:00 2001 From: Libby Date: Thu, 12 Nov 2026 23:06:22 +0000 Subject: [PATCH] cultcache-rs: the replace doc says absence to a lock-free reader is rare on NTFS, not impossible Co-Authored-By: Claude Sonnet 5.5 --- packages/cultcache-rs/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cultcache-rs/src/lib.rs b/packages/cultcache-rs/src/lib.rs index 30897958..d4d6a64e 100644 --- a/packages/cultcache-rs/src/lib.rs +++ b/packages/cultcache-rs/src/lib.rs @@ -4417,7 +4417,9 @@ trait ReplaceKernel { const MOVEFILE_REPLACE_WRITE_THROUGH: u32 = 0x9; /// Replaces `destination` with `staged` on Windows: a POSIX-semantics rename first, so a reader -/// that opened the old store keeps it and never sees the destination absent; MoveFileExW with +/// that opened the old store keeps it and the destination is rarely seen absent (a stalled rename +/// can still leave it absent for 5-47 ms on NTFS: `variants:ruling:posix-rename-absent-window-document`); +/// MoveFileExW with /// write-through where POSIX semantics are unsupported (FAT, exFAT, before Windows 10 1607), /// for the rest of the call; and a bounded retry on access, sharing and lock violations. /// A concurrent reader (another process, an indexer, an antivirus scan) makes the replace fail