Hi there,

Working with SQL queries with setLocal(true) with partitioned cache, it is
very easy for someone to run SQL queries without affinityRun or affinityCall
computations which are the preferred ways of running queries on partition
cache, as described in [1].

Now what I was thinking whenever a SQL is about to execute against
partitioned caches it should check for a check whether the call for this SQL
is made through an affinityRun or affinityCall function. If the call to SQL
is not part of affinityRun or affinityCall then by default it should log a
WARNING message or throw an exception which should be configurable in
CacheConfiguration. The advantage would be it won't break others code
instantly and allow them some time to fix it.

This can be achieved when the affinityCall or affinityRun method is called
we can set something specifically for SQL queries in the context which can
be read before executing the queries. If the SQL processor cannot find the
value in the given context for partitioned caches we can either log the
warning or throw an exception based on the cache configuration.

Let me know if it makes sense?

Thanks,
Luqman

[1].  https://apacheignite-sql.readme.io/docs/local-queries
<https://apacheignite-sql.readme.io/docs/local-queries>  



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

Reply via email to