Integrators need to be able to detect if a specific index is local only or clustered
Description
Activity
Sanne Grinovero September 24, 2014 at 3:55 PM
Tried to implement this, and it turns out that - taking the Infinispan use case - when using an InfinispanIndexManager - the InfinispanDirectoryProvider is explicitly constructed so this implementation could expose whatever it might need directly, without needing us to expose generic access via the SPI.
Sanne Grinovero August 27, 2013 at 11:49 AM
The examples above are related to Infinispan Query but it is relevant to Hibernate Search/ORM too: if a master/slave backend is setup, the underlying Directory needs to be clustered. We don't check for this today.
Sanne Grinovero August 27, 2013 at 11:47 AM
It's a feature needed only to validate if the configuration makes sense, to be able to complain by logging warnings or possibly refusing to start via runtime exceptions.
In Infinispan for example it's valid to use a RAMDirectory or FSDirectory when using replication on a cache, but when using distribution the index needs to be "clustered".
The Infinispan Directory on the other hand could be used - depending on its configuration - as a performance boosted non-clustered index OR as a clustered index; to know how it has been setup requires access to specific details of its configuration.
If the Directory implementation could expose its capabilities we can build such validation.
Emmanuel Bernard August 21, 2013 at 3:07 PM
Can you describe what you have in mind. I am lost here.
See also https://issues.jboss.org/browse/ISPN-2141