On 12 Apr 2013, at 11:14, Sanne Grinovero <[email protected]> wrote:

> Thanks Israel! You're very welcome back.
> 
> In mandating the types :
> 
> First problem is you either change the method signature or you need to throw 
> a runtime exception when the varargs array is empty.
> 
> More importantly, the query targets are supposed to be polymorphic and we 
> actually need the list of class definitions of the subtypes too.
> 
> The easy solution is to have them all listed in the configuration.
> 
> Alternatively if you have users list all index names,  we can initialize them 
> eagerly and query the index for known class types, but this is problematic as 
> - harder to check the configuration is consistent with runtime usage 
> - such a query would need to be run periodically (before any other query?) to 
> catch new types inserted by other nodes 
> - some parameters of how the index is opened are actually inferred from the 
> indexed types : this would need no be a two phases index initialization.
> 
> Most user friendly solution is class path scanning,  as we do in Hibernate.
> 
Maybe then that is the best approach here as well?  Make it a part of the cache 
startup.  Or maybe just the SearchManager's initialisation.  SearchManagers 
will only be able to search for the types it has been told about when 
initialised.
> As a side note : Hibernate Search had to implement capability to 
> transparently hot-restart itself to support the dynamic type discovery of 
> Infinispan but really that code hurts my eyes and is very tricky to maintain: 
> every new functionality needs to be designed for it and tested for services 
> or new configuration details which could appear at any time.  I would love to 
> remove it.
> 
Yes, I remember.  I requested this feature.  :)
> Sanne
> 
> On Apr 12, 2013 10:42 AM, "Manik Surtani" <[email protected]> wrote:
> Mandating passing in the types in SearchManager.getQuery() won't work?
> 
> On 11 Apr 2013, at 20:50, Sanne Grinovero <[email protected]> wrote:
> 
>> That's correct. It does not affect only joiners though,  there are several 
>> cases:
>> 
>> - first node starting but having existing data in some CacheStore 
>> - node A does a put with new type,  existing node B then runs a query
>> 
>> Looks like the easy solution is to store the set of known types as an entry, 
>>  but even assuming there are no classloader issues there are some not so 
>> clear side effects,  such as statistics getting skewed and similar.
>> 
>> On Apr 11, 2013 8:24 PM, "Manik Surtani" <[email protected]> wrote:
>> I presume this is to deal with the case when a node joins the cluster 
>> (shared index), and someone does a SearchManager.getQuery() without passing 
>> in any types?  Is that correct?  If a type or more than one type is passed 
>> in to that method then you don't have this problem, right?
>> 
>> - M
>> 
>> 
>> On 11 Apr 2013, at 18:40, Sanne Grinovero <[email protected]> wrote:
>> 
>> > This issue has been assigned to me for long, but I'm unable to find
>> > time to work on it soon. Still, it's quite an important one, quite
>> > annoying it's still open.
>> >
>> > Any volunteer?
>> >
>> > Requires a bit of coding in the Query module, but is totally unrelated
>> > to Lucene so anyone familiar with Infinispan could do it.
>> >
>> > Cheers,
>> > Sanne
>> > _______________________________________________
>> > infinispan-dev mailing list
>> > [email protected]
>> > https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> 
>> --
>> Manik Surtani
>> [email protected]
>> twitter.com/maniksurtani
>> 
>> Platform Architect, JBoss Data Grid
>> http://red.ht/data-grid
>> 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> [email protected]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>> _______________________________________________
>> infinispan-dev mailing list
>> [email protected]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> [email protected]
> twitter.com/maniksurtani
> 
> Platform Architect, JBoss Data Grid
> http://red.ht/data-grid
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> _______________________________________________
> infinispan-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[email protected]
twitter.com/maniksurtani

Platform Architect, JBoss Data Grid
http://red.ht/data-grid

_______________________________________________
infinispan-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to