[infinispan-dev] Deprecation of Index.LOCAL

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Deprecation of Index.LOCAL

Gustavo Fernandes-2
Hi, the Index.LOCAL setting was introduced eons ago to allow indexing to occur once cluster-wide;
thus it's recommended when using an IndexManager such as InfinispanIndexManager and ElasticsearchIndexManager that is shared among all nodes.

Furthermore, Index.LOCAL suits ClusteredQueries [1] where each node has its own "private" index and query is broadcasted to each individual node, and aggregated in the caller before returning the results.

The issue with Index.LOCAL is when a command is originated in a NON_OWNER (this happens in DIST caches), where there is no context available that prevents obtention of previous values needed certain commands. This makes fixing [2] complex as it requires fiddling with more than a couple of interceptors, and it'd require remote fetching of values. This extra fetch could be avoided if indexing always occurs in the owners.


tl;dr

The proposal is to deprecate Index.LOCAL, and map it internally to Index.PRIMARY_OWNER
Everything should work as before, except if someone is relying to find a certain entry indexed in a specific local index where the put was issued: the ClusteredQuery test suite does that, but I don't think this is a realistic use case.

Any objections?

Thanks,
Gustavo

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Deprecation of Index.LOCAL

Sanne Grinovero-3
+1 to deprecate it

We might need some replacement for internal optimisations and building
blocks, like you suggested it's at least useful for tests, but we
shouldn't expose all this complexity.

BTW these options have been introduced before myself and Adrian, so I
guess nobody is around anymore to explain why they have been
originally introduced.

Thanks,
Sanne


On 15 May 2017 at 10:09, Gustavo Fernandes <[hidden email]> wrote:

> Hi, the Index.LOCAL setting was introduced eons ago to allow indexing to
> occur once cluster-wide;
> thus it's recommended when using an IndexManager such as
> InfinispanIndexManager and ElasticsearchIndexManager that is shared among
> all nodes.
>
> Furthermore, Index.LOCAL suits ClusteredQueries [1] where each node has its
> own "private" index and query is broadcasted to each individual node, and
> aggregated in the caller before returning the results.
>
> The issue with Index.LOCAL is when a command is originated in a NON_OWNER
> (this happens in DIST caches), where there is no context available that
> prevents obtention of previous values needed certain commands. This makes
> fixing [2] complex as it requires fiddling with more than a couple of
> interceptors, and it'd require remote fetching of values. This extra fetch
> could be avoided if indexing always occurs in the owners.
>
>
> tl;dr
>
> The proposal is to deprecate Index.LOCAL, and map it internally to
> Index.PRIMARY_OWNER
> Everything should work as before, except if someone is relying to find a
> certain entry indexed in a specific local index where the put was issued:
> the ClusteredQuery test suite does that, but I don't think this is a
> realistic use case.
>
> Any objections?
>
> Thanks,
> Gustavo
>
>
> [1]
> http://infinispan.org/docs/stable/user_guide/user_guide.html#query.clustered-query-api
> [2] https://issues.jboss.org/browse/ISPN-7806
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Deprecation of Index.LOCAL

Adrian Nistor
In reply to this post by Gustavo Fernandes-2
+1 to kill it.


On 05/15/2017 12:09 PM, Gustavo Fernandes wrote:
Hi, the Index.LOCAL setting was introduced eons ago to allow indexing to occur once cluster-wide;
thus it's recommended when using an IndexManager such as InfinispanIndexManager and ElasticsearchIndexManager that is shared among all nodes.

Furthermore, Index.LOCAL suits ClusteredQueries [1] where each node has its own "private" index and query is broadcasted to each individual node, and aggregated in the caller before returning the results.

The issue with Index.LOCAL is when a command is originated in a NON_OWNER (this happens in DIST caches), where there is no context available that prevents obtention of previous values needed certain commands. This makes fixing [2] complex as it requires fiddling with more than a couple of interceptors, and it'd require remote fetching of values. This extra fetch could be avoided if indexing always occurs in the owners.


tl;dr

The proposal is to deprecate Index.LOCAL, and map it internally to Index.PRIMARY_OWNER
Everything should work as before, except if someone is relying to find a certain entry indexed in a specific local index where the put was issued: the ClusteredQuery test suite does that, but I don't think this is a realistic use case.

Any objections?

Thanks,
Gustavo


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



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