quickwit-oss / tantivy

Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust
MIT License
12.09k stars 670 forks source link

atomic_writes do not work if the temp directory and tantivy's directory are not on the same filesystem #876

Closed fulmicoton closed 4 years ago

fulmicoton commented 4 years ago

As reported by @raultang on https://github.com/tantivy-search/tantivy/pull/866

With this change, it is unable to create index if the data directory with OS system is in separated disk.

tempfile.into_temp_path().persist(full_path)?;
This line trying to create a hard link to /tmp/ directory (/tmp directory is in system disk)
Error message:
PathPersistError { error: Os { code: 18, kind: Other, message: "Invalid cross-device link" }, path: "/tmp/.tmp6JJxbQ" }
fulmicoton commented 4 years ago

@raultang can you confirm your problem is fixed in master?

raultang commented 4 years ago

thanks @fulmicoton for the quick fix, it works good now.