Use a good mem advice for uploads

This commit is contained in:
Kerollmops
2025-10-13 13:52:51 +02:00
committed by Clément Renault
parent 9ed7a81495
commit 21140a33e6

View File

@@ -316,6 +316,7 @@ impl IndexScheduler {
.try_clone_inner_file()
.map_err(|e| Error::from_milli(e, Some(name.to_string())))?;
let mmap = unsafe { memmap2::Mmap::map(&file)? };
mmap.advise(memmap2::Advice::Sequential)?;
let mmap = bytes::Bytes::from_owner(mmap);
let object = uuid.to_string();