[infinispan-issues] [JBoss JIRA] (ISPN-6178) Add ability to define indexable classes via config
Adrian Nistor (JIRA)
issues at jboss.org
Thu Feb 4 12:31:00 EST 2016
Adrian Nistor created ISPN-6178:
-----------------------------------
Summary: Add ability to define indexable classes via config
Key: ISPN-6178
URL: https://issues.jboss.org/browse/ISPN-6178
Project: Infinispan
Issue Type: Feature Request
Components: Embedded Querying
Reporter: Adrian Nistor
Queryable classes are currently auto-detected on the fly by the QueryInterceptor on each write operation. The set of discovered classes is replciated by means of ClusterRegistry.
This approach creates a lot of technical complexity and the implementation has a number of flaws; some have been fixed after several iterations but the solution is still brittle and can lead to locking issues. It also forces Hibernate Search to reconfigure the factory which is rather messy. In stead of continuing to patch and 'improve' this we should consider pre-declaring the indexable classes in the cache configuration (indexing configuration actually).
Given the impact of this change to existing codebase I would propose an approach that allows an easy transition:
1. Introduction of a new config in indexing configuration to be able to specify the classes.
2. If cache is indexed but no indexable classes were defined fallback to on-demand auto-detection as it worked in 8.1.
3. If cache is indexed and classes were specified use them and do not perform on-demand auto-detection anymore.
This is how it should work in 8.2. Auto-detection should also be documented as deprecated in 8.2 and should be removed completely in 9.0. In 9.0 marking a cache as indexed but not specifying which exact classes should result in an error at config time validation.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list