mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-03 00:20:57 -05:00
Adapt to breaking changes in fs4 1.0.0: - `fs4::fs_std::FileExt` flattened to `fs4::FileExt` (segment.rs) - Removed `fs4::FileExt` import from lib.rs — with Rust 1.89+ `File::try_lock()` is stabilized in std, so the fs4 trait is no longer needed for exclusive locking - `try_lock_exclusive()` → `try_lock()` via `fs_err::File` wrapper with return type `Result<(), TryLockError>` (WouldBlock on contention) - Removed `lock_contended_error()` — use `ErrorKind::WouldBlock` On Windows, fs4 1.0.0 skips set_len inside allocate() when the cluster-aligned allocation already covers the requested size. Add explicit set_len calls after allocate() so the mmap has the correct file extent. The `fs4::available_space()` function used in shard/optimize.rs and collection/disk_usage_watcher.rs is unchanged in 1.0.0. Made-with: Cursor Co-authored-by: Cursor Agent <agent@cursor.com>