What do you mean saying that you're not able to perform SQL queries?
Do you get an error, empty or partial result set? Please be more specific.
In any case I want to draw your attention that if there is still some data in a cache storage that has to be loaded then it won't be loaded automatically during a SQL query execution regardless whether readThrough is enabled or not.
If you're sure that all the data is loaded please make a call like this to check the cache size:
And please properly subscribe to the user list (this way we will not have to manually approve your emails). All you need to do is send an email to “email@example.com” and follow simple instructions in the reply.
I am getting empty result set, but I can see cache is loaded with all data.
Checked the cache size using "cache.size(CachePeekMode.PRIMARY)" and I am getting expected cache size.
But when I am performing "select * " operation using "cache.query(...)" I am getting empty resultset.
Here you get instance of a cache name CACHE_NAME, that according to the generic holds ProtocolCache, but right after tries to query PersonCache objects. Probably CACHE_NAME is not a valid one, please double-check that this is not your case.
BTW, open CacheQueryExample, that is a part of Ignite, add the function below to it and execute it
I was able to execute queries on cache after disabling Readthrough, WriteThrough configuration. But with the same query when I use Readthrough, WriteThrough configuration I am getting empty result set.
I am referring to ignite examples, there I couldn't find queries executed after enabling store configuration.
It will be great help if you can provide me such example.
Could you share a runnable example, that demonstrates the issue, over GitHub or some other way?
For me it's unclear how readThrough or writeThrough can affect a result of a SQL query having in mind that the full data set has already been loaded from the storage and the data set is not being changed while queries are being executed. This is exactly your case, correct?
As an example to can refer to CacheDummyStoreExample. However you need to modify it a bit:
1) Activate indexing for the cache used in the example