Create a FSDirectory extension which doesn't ever sync to disk

Description

This might sound quite dangerous, but there is actually a valid use case for a throw-away index which doesn't need to be synced to storage, as we'd reset the index content on initialization.

So the DirectoryProvider#initialize() should make sure it can cleanup a corrupted index.

The valid use case is Infinispan Query operating on a REPL configured node: the index needs to be written efficiently, but will be re-written if the node reinitializes.
It would actually be an error to try reuse any content from the stored index, as the content would not match what's being stored in the Cache via state transfer (it would contain stale data).

Environment

None

Status

Assignee

Unassigned

Reporter

Sanne Grinovero

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Priority

Major
Configure