FileHelper based index replication attempts to delete locked files on Windows

Description

The method org.hibernate.search.util.impl.FileHelper.delete(Path) might be invoked during an "rsync style" index replication while the files being deleted are still in use by some IndexReader, as there might be concurrent read operations.

This is fine on Unix systems, but on Windows the read operations prevent the delete operation from succeeding, so the index replication job fails.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Priority

Major