You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by goutham manchikatla <ga...@gmail.com> on 2019/06/05 19:36:56 UTC

unable to query the cache after restart

Hi,

I have an Ignite SQL cache setup with persistence enabled and loaded the
cache with 10 million records.
Once I do a cache restart, I get an empty response when I query the cache.
But when I check cache size it gives me 10 million record count in cache.
Any suggestions?

Thanks

Re: unable to query the cache after restart

Posted by Павлухин Иван <vo...@gmail.com>.
Hi,

First bet is that it is a problem with configuring persistence for a
cache, but I have not found any problems in config. I can suggest to
check a directory with database files to check that the same directory
is used among node restarts and that it contains files for the cache
in question.

чт, 6 июн. 2019 г. в 19:39, goutham manchikatla <ga...@gmail.com>:
>
> Hi,
> I will work on the reproducer project.
>
> I am using 2.7 version. Also I tried with Java SQL API
>
> SqlFieldsQuery sql = new SqlFieldsQuery(query);
>
> QueryCursor<List<?>> cursor = cache.query(sql)
>
>
> On Thu, Jun 6, 2019 at 10:32 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>
>> Hello!
>>
>> Can you make a reproducer project which will exhibit this behavior? One which will fill enough data in cache so that this behavior is observable after restart.
>>
>> BTW, what's the version you are on?
>>
>> Have you tried scan query (via Java code)?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 6 июн. 2019 г. в 19:25, goutham manchikatla <ga...@gmail.com>:
>>>
>>> http://localhost:8080/ignite?user=ignite&password=ignite&cmd=qryexe&type=Account&pageSize=10&cacheName=lincs_cache&qry=select%20*%20from%20lincs.account%20LIMIT%2010
>>>
>>> Yes I tried using Debeaver JDBC, query -SELECT * FROM LINCS.ACCOUNT LIMIT 10;
>>>
>>> Still the same behavior.
>>>
>>> On Thu, Jun 6, 2019 at 10:20 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>
>>>> Hello!
>>>>
>>>> What's the query in question? Have you tried using e.g. sqlline to connect via JDBC?
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 6 июн. 2019 г. в 19:15, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I reproduced the behavior. I stopped the cache nodes and started them again. I see the metadata, cache count, but no query response:
>>>>>
>>>>> {"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}
>>>>>
>>>>>  Record count:
>>>>>
>>>>> {"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}
>>>>>
>>>>> Query Output:
>>>>>
>>>>> {"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}
>>>>>
>>>>>
>>>>> I don't see any data in the response.
>>>>>
>>>>>
>>>>> On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> Looks OK. Can you reproduce the behavior, or is it a one-time occurrence? What happens if you try to scan that cache? Anything suspicious in your logs?
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Ilya Kasnacheev
>>>>>>
>>>>>>
>>>>>> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I didn't change any code between restarts. Below is the configuration.
>>>>>>>
>>>>>>> <property name="dataStorageConfiguration">
>>>>>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>>>>>                 <property name="concurrencyLevel" value="4"/>
>>>>>>>                 <property name="walHistorySize" value="2"/>
>>>>>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>>>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>>>>>                 <property name="defaultDataRegionConfiguration">
>>>>>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>>>                         <property name="name" value="Default_Region"/>
>>>>>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>>>>>                     </bean>
>>>>>>>                 </property>
>>>>>>>                 <property name="dataRegionConfigurations">
>>>>>>>                     <list>
>>>>>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>>>                             <property name="name" value="500MB_Region"/>
>>>>>>>                             <!-- Memory region of 600 MB initial size. -->
>>>>>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>>>>>                             <!-- Maximum size is 10GB. -->
>>>>>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>>>>>                             <!-- Enabling persistence for the region -->
>>>>>>>                             <property name="persistenceEnabled" value="true"/>
>>>>>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>>>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>>>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>>>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>>>>>                         </bean>
>>>>>>>                     </list>
>>>>>>>                 </property>
>>>>>>>             </bean>
>>>>>>>         </property>
>>>>>>>         <!-- Enabling authentication. -->
>>>>>>>         <property name="authenticationEnabled" value="true"/>
>>>>>>>         <!-- cache configuration -->
>>>>>>>         <property name="cacheConfiguration">
>>>>>>>             <list>
>>>>>>>                 <!-- partitioned cache configuration. -->
>>>>>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>>>>>                     <property name="groupName" value="oegress"/>
>>>>>>>                     <property name="name" value="lincs_cache"/>
>>>>>>>                     <property name="sqlSchema" value="lincs"/>
>>>>>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>>>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>>>>>                     <property name="backups" value="0"/>
>>>>>>>                     <property name="readFromBackup" value="true"/>
>>>>>>>                     <property name="copyOnRead" value="true"/>
>>>>>>>                     <property name="readThrough" value="true"/>
>>>>>>>                     <property name="writeThrough" value="true"/>
>>>>>>>                     <property name="cacheStoreFactory">
>>>>>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>>>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>>>>>                         </bean>
>>>>>>>                     </property>
>>>>>>>                     <property name="queryEntities">
>>>>>>>                         <list>
>>>>>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>>>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>>>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>>>>>                                 <property name="fields">
>>>>>>>                                     <map>
>>>>>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>>>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>>>>>                                     </map>
>>>>>>>                                 </property>
>>>>>>>                             </bean>
>>>>>>>                         </list>
>>>>>>>                     </property>
>>>>>>>                 </bean>
>>>>>>>             </list>
>>>>>>>         </property>
>>>>>>>     </bean>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>>>>>
>>>>>>>> Hello!
>>>>>>>>
>>>>>>>> This is strange. What's cache configuration? Is there a reproducer? Did you change the code between restarts, including key/value types, if any?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> --
>>>>>>>> Ilya Kasnacheev
>>>>>>>>
>>>>>>>>
>>>>>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>>>>>>
>>>>>>>>> Yes , the query worked before restart.
>>>>>>>>>
>>>>>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> Hello!
>>>>>>>>>>
>>>>>>>>>> Does the query work before the restart?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Ilya Kasnacheev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded the cache with 10 million records.
>>>>>>>>>>> Once I do a cache restart, I get an empty response when I query the cache.
>>>>>>>>>>> But when I check cache size it gives me 10 million record count in cache.
>>>>>>>>>>> Any suggestions?
>>>>>>>>>>>
>>>>>>>>>>> Thanks



-- 
Best regards,
Ivan Pavlukhin

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
Hi,
I will work on the reproducer project.

I am using 2.7 version. Also I tried with Java SQL API

SqlFieldsQuery sql = *new* SqlFieldsQuery(query);

QueryCursor<List<?>> cursor = cache.query(sql)

On Thu, Jun 6, 2019 at 10:32 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Can you make a reproducer project which will exhibit this behavior? One
> which will fill enough data in cache so that this behavior is observable
> after restart.
>
> BTW, what's the version you are on?
>
> Have you tried scan query (via Java code)?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 6 июн. 2019 г. в 19:25, goutham manchikatla <ga...@gmail.com>:
>
>>
>> http://localhost:8080/ignite?user=ignite&password=ignite&cmd=qryexe&type=Account&pageSize=10&cacheName=lincs_cache&qry=select%20*%20from%20lincs.account%20LIMIT%2010
>>
>> Yes I tried using Debeaver JDBC, query -*SELECT* * *FROM* LINCS.ACCOUNT
>> *LIMIT* 10;
>>
>> Still the same behavior.
>>
>> On Thu, Jun 6, 2019 at 10:20 AM Ilya Kasnacheev <
>> ilya.kasnacheev@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> What's the query in question? Have you tried using e.g. sqlline to
>>> connect via JDBC?
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 6 июн. 2019 г. в 19:15, goutham manchikatla <ga...@gmail.com>:
>>>
>>>> Hi,
>>>>
>>>> I reproduced the behavior. I stopped the cache nodes and started them
>>>> again. I see the metadata, cache count, but no query response:
>>>>
>>>> {"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}
>>>>
>>>>  *Record count:*
>>>>
>>>> {"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}
>>>>
>>>> *Query Output:*
>>>>
>>>> {"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}
>>>>
>>>>
>>>> I don't see any data in the response.
>>>>
>>>>
>>>> On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <
>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> Looks OK. Can you reproduce the behavior, or is it a one-time
>>>>> occurrence? What happens if you try to scan that cache? Anything suspicious
>>>>> in your logs?
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I didn't change any code between restarts. Below is the configuration.
>>>>>>
>>>>>> <property name="dataStorageConfiguration">
>>>>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>>>>                 <property name="concurrencyLevel" value="4"/>
>>>>>>                 <property name="walHistorySize" value="2"/>
>>>>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>>>>                 <property name="defaultDataRegionConfiguration">
>>>>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>>                         <property name="name" value="Default_Region"/>
>>>>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>>>>                     </bean>
>>>>>>                 </property>
>>>>>>                 <property name="dataRegionConfigurations">
>>>>>>                     <list>
>>>>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>>                             <property name="name" value="500MB_Region"/>
>>>>>>                             <!-- Memory region of 600 MB initial size. -->
>>>>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>>>>                             <!-- Maximum size is 10GB. -->
>>>>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>>>>                             <!-- Enabling persistence for the region -->
>>>>>>                             <property name="persistenceEnabled" value="true"/>
>>>>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>>>>                         </bean>
>>>>>>                     </list>
>>>>>>                 </property>
>>>>>>             </bean>
>>>>>>         </property>
>>>>>>         <!-- Enabling authentication. -->
>>>>>>         <property name="authenticationEnabled" value="true"/>
>>>>>>         <!-- cache configuration -->
>>>>>>         <property name="cacheConfiguration">
>>>>>>             <list>
>>>>>>                 <!-- partitioned cache configuration. -->
>>>>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>>>>                     <property name="groupName" value="oegress"/>
>>>>>>                     <property name="name" value="lincs_cache"/>
>>>>>>                     <property name="sqlSchema" value="lincs"/>
>>>>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>>>>                     <property name="backups" value="0"/>
>>>>>>                     <property name="readFromBackup" value="true"/>
>>>>>>                     <property name="copyOnRead" value="true"/>
>>>>>>                     <property name="readThrough" value="true"/>
>>>>>>                     <property name="writeThrough" value="true"/>
>>>>>>                     <property name="cacheStoreFactory">
>>>>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>>>>                         </bean>
>>>>>>                     </property>
>>>>>>                     <property name="queryEntities">
>>>>>>                         <list>
>>>>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>>>>                                 <property name="fields">
>>>>>>                                     <map>
>>>>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>>>>                                     </map>
>>>>>>                                 </property>
>>>>>>                             </bean>
>>>>>>                         </list>
>>>>>>                     </property>
>>>>>>                 </bean>
>>>>>>             </list>
>>>>>>         </property>
>>>>>>     </bean>
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <
>>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>>
>>>>>>> Hello!
>>>>>>>
>>>>>>> This is strange. What's cache configuration? Is there a reproducer?
>>>>>>> Did you change the code between restarts, including key/value types, if any?
>>>>>>>
>>>>>>> Regards,
>>>>>>> --
>>>>>>> Ilya Kasnacheev
>>>>>>>
>>>>>>>
>>>>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>>>>
>>>>>>>> Yes , the query worked before restart.
>>>>>>>>
>>>>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello!
>>>>>>>>>
>>>>>>>>> Does the query work before the restart?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Ilya Kasnacheev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <gauti06@gmail.com
>>>>>>>>> >:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I have an Ignite SQL cache setup with persistence enabled and
>>>>>>>>>> loaded the cache with 10 million records.
>>>>>>>>>> Once I do a cache restart, I get an empty response when I query
>>>>>>>>>> the cache.
>>>>>>>>>> But when I check cache size it gives me 10 million record count
>>>>>>>>>> in cache.
>>>>>>>>>> Any suggestions?
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>

Re: unable to query the cache after restart

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Can you make a reproducer project which will exhibit this behavior? One
which will fill enough data in cache so that this behavior is observable
after restart.

BTW, what's the version you are on?

Have you tried scan query (via Java code)?

Regards,
-- 
Ilya Kasnacheev


чт, 6 июн. 2019 г. в 19:25, goutham manchikatla <ga...@gmail.com>:

>
> http://localhost:8080/ignite?user=ignite&password=ignite&cmd=qryexe&type=Account&pageSize=10&cacheName=lincs_cache&qry=select%20*%20from%20lincs.account%20LIMIT%2010
>
> Yes I tried using Debeaver JDBC, query -*SELECT* * *FROM* LINCS.ACCOUNT
> *LIMIT* 10;
>
> Still the same behavior.
>
> On Thu, Jun 6, 2019 at 10:20 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> What's the query in question? Have you tried using e.g. sqlline to
>> connect via JDBC?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 6 июн. 2019 г. в 19:15, goutham manchikatla <ga...@gmail.com>:
>>
>>> Hi,
>>>
>>> I reproduced the behavior. I stopped the cache nodes and started them
>>> again. I see the metadata, cache count, but no query response:
>>>
>>> {"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}
>>>
>>>  *Record count:*
>>>
>>> {"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}
>>>
>>> *Query Output:*
>>>
>>> {"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}
>>>
>>>
>>> I don't see any data in the response.
>>>
>>>
>>> On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> Looks OK. Can you reproduce the behavior, or is it a one-time
>>>> occurrence? What happens if you try to scan that cache? Anything suspicious
>>>> in your logs?
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I didn't change any code between restarts. Below is the configuration.
>>>>>
>>>>> <property name="dataStorageConfiguration">
>>>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>>>                 <property name="concurrencyLevel" value="4"/>
>>>>>                 <property name="walHistorySize" value="2"/>
>>>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>>>                 <property name="defaultDataRegionConfiguration">
>>>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>                         <property name="name" value="Default_Region"/>
>>>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>>>                     </bean>
>>>>>                 </property>
>>>>>                 <property name="dataRegionConfigurations">
>>>>>                     <list>
>>>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>>                             <property name="name" value="500MB_Region"/>
>>>>>                             <!-- Memory region of 600 MB initial size. -->
>>>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>>>                             <!-- Maximum size is 10GB. -->
>>>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>>>                             <!-- Enabling persistence for the region -->
>>>>>                             <property name="persistenceEnabled" value="true"/>
>>>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>>>                         </bean>
>>>>>                     </list>
>>>>>                 </property>
>>>>>             </bean>
>>>>>         </property>
>>>>>         <!-- Enabling authentication. -->
>>>>>         <property name="authenticationEnabled" value="true"/>
>>>>>         <!-- cache configuration -->
>>>>>         <property name="cacheConfiguration">
>>>>>             <list>
>>>>>                 <!-- partitioned cache configuration. -->
>>>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>>>                     <property name="groupName" value="oegress"/>
>>>>>                     <property name="name" value="lincs_cache"/>
>>>>>                     <property name="sqlSchema" value="lincs"/>
>>>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>>>                     <property name="backups" value="0"/>
>>>>>                     <property name="readFromBackup" value="true"/>
>>>>>                     <property name="copyOnRead" value="true"/>
>>>>>                     <property name="readThrough" value="true"/>
>>>>>                     <property name="writeThrough" value="true"/>
>>>>>                     <property name="cacheStoreFactory">
>>>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>>>                         </bean>
>>>>>                     </property>
>>>>>                     <property name="queryEntities">
>>>>>                         <list>
>>>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>>>                                 <property name="fields">
>>>>>                                     <map>
>>>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>>>                                     </map>
>>>>>                                 </property>
>>>>>                             </bean>
>>>>>                         </list>
>>>>>                     </property>
>>>>>                 </bean>
>>>>>             </list>
>>>>>         </property>
>>>>>     </bean>
>>>>>
>>>>>
>>>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <
>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> This is strange. What's cache configuration? Is there a reproducer?
>>>>>> Did you change the code between restarts, including key/value types, if any?
>>>>>>
>>>>>> Regards,
>>>>>> --
>>>>>> Ilya Kasnacheev
>>>>>>
>>>>>>
>>>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>>>
>>>>>>> Yes , the query worked before restart.
>>>>>>>
>>>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello!
>>>>>>>>
>>>>>>>> Does the query work before the restart?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> --
>>>>>>>> Ilya Kasnacheev
>>>>>>>>
>>>>>>>>
>>>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <gauti06@gmail.com
>>>>>>>> >:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I have an Ignite SQL cache setup with persistence enabled and
>>>>>>>>> loaded the cache with 10 million records.
>>>>>>>>> Once I do a cache restart, I get an empty response when I query
>>>>>>>>> the cache.
>>>>>>>>> But when I check cache size it gives me 10 million record count in
>>>>>>>>> cache.
>>>>>>>>> Any suggestions?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
http://localhost:8080/ignite?user=ignite&password=ignite&cmd=qryexe&type=Account&pageSize=10&cacheName=lincs_cache&qry=select%20*%20from%20lincs.account%20LIMIT%2010

Yes I tried using Debeaver JDBC, query -*SELECT* * *FROM* LINCS.ACCOUNT
*LIMIT* 10;

Still the same behavior.

On Thu, Jun 6, 2019 at 10:20 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> What's the query in question? Have you tried using e.g. sqlline to connect
> via JDBC?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 6 июн. 2019 г. в 19:15, goutham manchikatla <ga...@gmail.com>:
>
>> Hi,
>>
>> I reproduced the behavior. I stopped the cache nodes and started them
>> again. I see the metadata, cache count, but no query response:
>>
>> {"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}
>>
>>  *Record count:*
>>
>> {"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}
>>
>> *Query Output:*
>>
>> {"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}
>>
>>
>> I don't see any data in the response.
>>
>>
>> On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> Looks OK. Can you reproduce the behavior, or is it a one-time
>>> occurrence? What happens if you try to scan that cache? Anything suspicious
>>> in your logs?
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>>>
>>>> Hi,
>>>>
>>>> I didn't change any code between restarts. Below is the configuration.
>>>>
>>>> <property name="dataStorageConfiguration">
>>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>>                 <property name="concurrencyLevel" value="4"/>
>>>>                 <property name="walHistorySize" value="2"/>
>>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>>                 <property name="defaultDataRegionConfiguration">
>>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>                         <property name="name" value="Default_Region"/>
>>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>>                     </bean>
>>>>                 </property>
>>>>                 <property name="dataRegionConfigurations">
>>>>                     <list>
>>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>>                             <property name="name" value="500MB_Region"/>
>>>>                             <!-- Memory region of 600 MB initial size. -->
>>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>>                             <!-- Maximum size is 10GB. -->
>>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>>                             <!-- Enabling persistence for the region -->
>>>>                             <property name="persistenceEnabled" value="true"/>
>>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>>                         </bean>
>>>>                     </list>
>>>>                 </property>
>>>>             </bean>
>>>>         </property>
>>>>         <!-- Enabling authentication. -->
>>>>         <property name="authenticationEnabled" value="true"/>
>>>>         <!-- cache configuration -->
>>>>         <property name="cacheConfiguration">
>>>>             <list>
>>>>                 <!-- partitioned cache configuration. -->
>>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>>                     <property name="groupName" value="oegress"/>
>>>>                     <property name="name" value="lincs_cache"/>
>>>>                     <property name="sqlSchema" value="lincs"/>
>>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>>                     <property name="backups" value="0"/>
>>>>                     <property name="readFromBackup" value="true"/>
>>>>                     <property name="copyOnRead" value="true"/>
>>>>                     <property name="readThrough" value="true"/>
>>>>                     <property name="writeThrough" value="true"/>
>>>>                     <property name="cacheStoreFactory">
>>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>>                         </bean>
>>>>                     </property>
>>>>                     <property name="queryEntities">
>>>>                         <list>
>>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>>                                 <property name="fields">
>>>>                                     <map>
>>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>>                                     </map>
>>>>                                 </property>
>>>>                             </bean>
>>>>                         </list>
>>>>                     </property>
>>>>                 </bean>
>>>>             </list>
>>>>         </property>
>>>>     </bean>
>>>>
>>>>
>>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <
>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> This is strange. What's cache configuration? Is there a reproducer?
>>>>> Did you change the code between restarts, including key/value types, if any?
>>>>>
>>>>> Regards,
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>>> Yes , the query worked before restart.
>>>>>>
>>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>>
>>>>>>> Hello!
>>>>>>>
>>>>>>> Does the query work before the restart?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> --
>>>>>>> Ilya Kasnacheev
>>>>>>>
>>>>>>>
>>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I have an Ignite SQL cache setup with persistence enabled and
>>>>>>>> loaded the cache with 10 million records.
>>>>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>>>>> cache.
>>>>>>>> But when I check cache size it gives me 10 million record count in
>>>>>>>> cache.
>>>>>>>> Any suggestions?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>

Re: unable to query the cache after restart

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

What's the query in question? Have you tried using e.g. sqlline to connect
via JDBC?

Regards,
-- 
Ilya Kasnacheev


чт, 6 июн. 2019 г. в 19:15, goutham manchikatla <ga...@gmail.com>:

> Hi,
>
> I reproduced the behavior. I stopped the cache nodes and started them
> again. I see the metadata, cache count, but no query response:
>
> {"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}
>
>  *Record count:*
>
> {"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}
>
> *Query Output:*
>
> {"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}
>
>
> I don't see any data in the response.
>
>
> On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> Looks OK. Can you reproduce the behavior, or is it a one-time occurrence?
>> What happens if you try to scan that cache? Anything suspicious in your
>> logs?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>>
>>> Hi,
>>>
>>> I didn't change any code between restarts. Below is the configuration.
>>>
>>> <property name="dataStorageConfiguration">
>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>                 <property name="concurrencyLevel" value="4"/>
>>>                 <property name="walHistorySize" value="2"/>
>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>                 <property name="defaultDataRegionConfiguration">
>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>                         <property name="name" value="Default_Region"/>
>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>                     </bean>
>>>                 </property>
>>>                 <property name="dataRegionConfigurations">
>>>                     <list>
>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>                             <property name="name" value="500MB_Region"/>
>>>                             <!-- Memory region of 600 MB initial size. -->
>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>                             <!-- Maximum size is 10GB. -->
>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>                             <!-- Enabling persistence for the region -->
>>>                             <property name="persistenceEnabled" value="true"/>
>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>                         </bean>
>>>                     </list>
>>>                 </property>
>>>             </bean>
>>>         </property>
>>>         <!-- Enabling authentication. -->
>>>         <property name="authenticationEnabled" value="true"/>
>>>         <!-- cache configuration -->
>>>         <property name="cacheConfiguration">
>>>             <list>
>>>                 <!-- partitioned cache configuration. -->
>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>                     <property name="groupName" value="oegress"/>
>>>                     <property name="name" value="lincs_cache"/>
>>>                     <property name="sqlSchema" value="lincs"/>
>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>                     <property name="backups" value="0"/>
>>>                     <property name="readFromBackup" value="true"/>
>>>                     <property name="copyOnRead" value="true"/>
>>>                     <property name="readThrough" value="true"/>
>>>                     <property name="writeThrough" value="true"/>
>>>                     <property name="cacheStoreFactory">
>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>                         </bean>
>>>                     </property>
>>>                     <property name="queryEntities">
>>>                         <list>
>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>                                 <property name="fields">
>>>                                     <map>
>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>                                     </map>
>>>                                 </property>
>>>                             </bean>
>>>                         </list>
>>>                     </property>
>>>                 </bean>
>>>             </list>
>>>         </property>
>>>     </bean>
>>>
>>>
>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> This is strange. What's cache configuration? Is there a reproducer? Did
>>>> you change the code between restarts, including key/value types, if any?
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>
>>>>> Yes , the query worked before restart.
>>>>>
>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> Does the query work before the restart?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> --
>>>>>> Ilya Kasnacheev
>>>>>>
>>>>>>
>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>>>>> the cache with 10 million records.
>>>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>>>> cache.
>>>>>>> But when I check cache size it gives me 10 million record count in
>>>>>>> cache.
>>>>>>> Any suggestions?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
Hi,

I reproduced the behavior. I stopped the cache nodes and started them
again. I see the metadata, cache count, but no query response:

{"successStatus":0,"sessionToken":"94DAD112C4E848E98663AF5883BBDDE2","response":[{"cacheName":"lincs_cache","types":["Account"],"keyClasses":{"Account":"java.lang.String"},"valClasses":{"Account":"com.domain.Account"},"fields":{"Account":{"ACCOUNTNUMBER":"java.lang.String","FIRSTNAME":"java.lang.String","LASTNAME":"java.lang.String","SERVADDRLINE1":"java.lang.String","SERVADDRLINE2":"java.lang.String","SERVADDRCITY":"java.lang.String","SERVADDRSTATE":"java.lang.String","SERVADDRZIP":"java.lang.String","BILLADDRLINE1":"java.lang.String","BILLADDRLINE2":"java.lang.String","BILLADDRCITY":"java.lang.String","BILLADDRSTATE":"java.lang.String","BILLADDRZIP":"java.lang.String","BILLINGSYSTEM":"java.lang.String"}},"indexes":{"Account":[]}}],"error":null}

 *Record count:*

{"successStatus":0,"affinityNodeId":null,"sessionToken":"0BBB1DA51FA243298D378D1F2D2DFE80","response":121039244,"error":null}

*Query Output:*

{"successStatus":0,"sessionToken":"69E405FB1E93472FA3F06A1312E31597","error":null,"response":{"items":[],"last":true,"fieldsMetadata":[],"queryId":6}}


I don't see any data in the response.


On Thu, Jun 6, 2019 at 9:50 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Looks OK. Can you reproduce the behavior, or is it a one-time occurrence?
> What happens if you try to scan that cache? Anything suspicious in your
> logs?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:
>
>> Hi,
>>
>> I didn't change any code between restarts. Below is the configuration.
>>
>> <property name="dataStorageConfiguration">
>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>                 <property name="concurrencyLevel" value="4"/>
>>                 <property name="walHistorySize" value="2"/>
>>                <property name="writeThrottlingEnabled" value="true"/>
>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>                 <property name="defaultDataRegionConfiguration">
>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>                         <property name="name" value="Default_Region"/>
>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>                     </bean>
>>                 </property>
>>                 <property name="dataRegionConfigurations">
>>                     <list>
>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>                             <property name="name" value="500MB_Region"/>
>>                             <!-- Memory region of 600 MB initial size. -->
>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>                             <!-- Maximum size is 10GB. -->
>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>                             <!-- Enabling persistence for the region -->
>>                             <property name="persistenceEnabled" value="true"/>
>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>                             <!-- Increasing the buffer size to 1 GB. -->
>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>                         </bean>
>>                     </list>
>>                 </property>
>>             </bean>
>>         </property>
>>         <!-- Enabling authentication. -->
>>         <property name="authenticationEnabled" value="true"/>
>>         <!-- cache configuration -->
>>         <property name="cacheConfiguration">
>>             <list>
>>                 <!-- partitioned cache configuration. -->
>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>                     <property name="dataRegionName" value="500MB_Region"/>
>>                     <property name="groupName" value="oegress"/>
>>                     <property name="name" value="lincs_cache"/>
>>                     <property name="sqlSchema" value="lincs"/>
>>                     <property name="cacheMode" value="PARTITIONED"/>
>>                     <property name="atomicityMode" value="ATOMIC"/>
>>                     <property name="backups" value="0"/>
>>                     <property name="readFromBackup" value="true"/>
>>                     <property name="copyOnRead" value="true"/>
>>                     <property name="readThrough" value="true"/>
>>                     <property name="writeThrough" value="true"/>
>>                     <property name="cacheStoreFactory">
>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>                         </bean>
>>                     </property>
>>                     <property name="queryEntities">
>>                         <list>
>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>                                 <property name="keyType" value="java.lang.String"></property>
>>                                 <property name="valueType" value="com.domain.Account"></property>
>>                                 <property name="fields">
>>                                     <map>
>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>                                     </map>
>>                                 </property>
>>                             </bean>
>>                         </list>
>>                     </property>
>>                 </bean>
>>             </list>
>>         </property>
>>     </bean>
>>
>>
>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> This is strange. What's cache configuration? Is there a reproducer? Did
>>> you change the code between restarts, including key/value types, if any?
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>
>>>> Yes , the query worked before restart.
>>>>
>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> Does the query work before the restart?
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>>>> the cache with 10 million records.
>>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>>> cache.
>>>>>> But when I check cache size it gives me 10 million record count in
>>>>>> cache.
>>>>>> Any suggestions?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>

Re: unable to query the cache after restart

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Looks OK. Can you reproduce the behavior, or is it a one-time occurrence?
What happens if you try to scan that cache? Anything suspicious in your
logs?

Regards,
-- 
Ilya Kasnacheev


чт, 6 июн. 2019 г. в 18:30, goutham manchikatla <ga...@gmail.com>:

> Hi,
>
> I didn't change any code between restarts. Below is the configuration.
>
> <property name="dataStorageConfiguration">
>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>                 <property name="concurrencyLevel" value="4"/>
>                 <property name="walHistorySize" value="2"/>
>                <property name="writeThrottlingEnabled" value="true"/>
>                 <property name="pageSize" value="#{4 * 1024}"/>
>                 <property name="defaultDataRegionConfiguration">
>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>                         <property name="name" value="Default_Region"/>
>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>                     </bean>
>                 </property>
>                 <property name="dataRegionConfigurations">
>                     <list>
>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>                             <property name="name" value="500MB_Region"/>
>                             <!-- Memory region of 600 MB initial size. -->
>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>                             <!-- Maximum size is 10GB. -->
>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>                             <!-- Enabling persistence for the region -->
>                             <property name="persistenceEnabled" value="true"/>
>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>                             <!-- Increasing the buffer size to 1 GB. -->
>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>                         </bean>
>                     </list>
>                 </property>
>             </bean>
>         </property>
>         <!-- Enabling authentication. -->
>         <property name="authenticationEnabled" value="true"/>
>         <!-- cache configuration -->
>         <property name="cacheConfiguration">
>             <list>
>                 <!-- partitioned cache configuration. -->
>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="dataRegionName" value="500MB_Region"/>
>                     <property name="groupName" value="oegress"/>
>                     <property name="name" value="lincs_cache"/>
>                     <property name="sqlSchema" value="lincs"/>
>                     <property name="cacheMode" value="PARTITIONED"/>
>                     <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="backups" value="0"/>
>                     <property name="readFromBackup" value="true"/>
>                     <property name="copyOnRead" value="true"/>
>                     <property name="readThrough" value="true"/>
>                     <property name="writeThrough" value="true"/>
>                     <property name="cacheStoreFactory">
>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>                         </bean>
>                     </property>
>                     <property name="queryEntities">
>                         <list>
>                             <bean class="org.apache.ignite.cache.QueryEntity">
>                                 <property name="keyType" value="java.lang.String"></property>
>                                 <property name="valueType" value="com.domain.Account"></property>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>                                         <entry key="firstName" value="java.lang.String"></entry>
>                                         <entry key="lastName" value="java.lang.String"></entry>
>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>                                     </map>
>                                 </property>
>                             </bean>
>                         </list>
>                     </property>
>                 </bean>
>             </list>
>         </property>
>     </bean>
>
>
> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> This is strange. What's cache configuration? Is there a reproducer? Did
>> you change the code between restarts, including key/value types, if any?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>
>>> Yes , the query worked before restart.
>>>
>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> Does the query work before the restart?
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>>> the cache with 10 million records.
>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>> cache.
>>>>> But when I check cache size it gives me 10 million record count in
>>>>> cache.
>>>>> Any suggestions?
>>>>>
>>>>> Thanks
>>>>>
>>>>

Re: unable to query the cache after restart

Posted by Павлухин Иван <vo...@gmail.com>.
Have no clever idea, waiting for a reproducer.

вт, 25 июн. 2019 г. в 05:59, goutham manchikatla <ga...@gmail.com>:
>
> It didn't work as expected, tried disable/enable WAL too, still I see the same behavior.
>
> On Mon, Jun 24, 2019 at 7:32 AM Павлухин Иван <vo...@gmail.com> wrote:
>>
>> Hi Goutham,
>>
>> I did not get from your last message does it work now as expected? If
>> not does it work without a trick with disable/enable WAL?
>>
>> ср, 19 июн. 2019 г. в 19:18, goutham manchikatla <ga...@gmail.com>:
>> >
>> > Hi Denis,
>> >
>> > I tried removing Default_Region name property from config, still I see the same behavior. But when I trigger load_cache process, and query the cache(after a complete cluster restart) , I am getting the response.
>> >
>> > Below is the Load_cache process.
>> >  try (Ignite ignite = Ignition.start(configFile)) {
>> >
>> >
>> > // Start loading cache on all caching nodes.
>> >
>> > final IgniteCache<String, Account> cache = ignite.cache(cacheName);
>> >
>> > long ts = System.currentTimeMillis();
>> >
>> >
>> > IgniteCluster cluster = ignite.cluster();
>> >
>> > cluster.disableWal(cacheName);
>> >
>> >
>> > LOG.info("Disabling WAL for Initial Data Loading");
>> >
>> >
>> > cache.loadCache(null, ignite, cacheName, sqlquery);
>> >
>> >
>> > LOG.info("Loaded Cache in " + (System.currentTimeMillis() - ts) + " millisecs");
>> >
>> >
>> > cluster.enableWal(cacheName);
>> >
>> >
>> > LOG.info("Enabling WAL after the pre-loading is complete");
>> >
>> > }
>> >
>> >
>> > Thanks,
>> >
>> > Goutham
>> >
>> >
>> > On Tue, Jun 18, 2019 at 8:45 PM Denis Magda <dm...@apache.org> wrote:
>> >>
>> >> Try to remove Default_Region name property from your config. If to follow this example that’s how persistence is enabled for the default region:
>> >> https://apacheignite.readme.io/docs/distributed-persistent-store
>> >>
>> >> Denis
>> >>
>> >>
>> >> On Thursday, June 6, 2019, goutham manchikatla <ga...@gmail.com> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I didn't change any code between restarts. Below is the configuration.
>> >>>
>> >>> <property name="dataStorageConfiguration">
>> >>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>> >>>                 <property name="concurrencyLevel" value="4"/>
>> >>>                 <property name="walHistorySize" value="2"/>
>> >>>                <property name="writeThrottlingEnabled" value="true"/>
>> >>>                 <property name="pageSize" value="#{4 * 1024}"/>
>> >>>                 <property name="defaultDataRegionConfiguration">
>> >>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>> >>>                         <property name="name" value="Default_Region"/>
>> >>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>> >>>                     </bean>
>> >>>                 </property>
>> >>>                 <property name="dataRegionConfigurations">
>> >>>                     <list>
>> >>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>> >>>                             <property name="name" value="500MB_Region"/>
>> >>>                             <!-- Memory region of 600 MB initial size. -->
>> >>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>> >>>                             <!-- Maximum size is 10GB. -->
>> >>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>> >>>                             <!-- Enabling persistence for the region -->
>> >>>                             <property name="persistenceEnabled" value="true"/>
>> >>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>> >>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>> >>>                             <!-- Increasing the buffer size to 1 GB. -->
>> >>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>> >>>                         </bean>
>> >>>                     </list>
>> >>>                 </property>
>> >>>             </bean>
>> >>>         </property>
>> >>>         <!-- Enabling authentication. -->
>> >>>         <property name="authenticationEnabled" value="true"/>
>> >>>         <!-- cache configuration -->
>> >>>         <property name="cacheConfiguration">
>> >>>             <list>
>> >>>                 <!-- partitioned cache configuration. -->
>> >>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>> >>>                     <property name="dataRegionName" value="500MB_Region"/>
>> >>>                     <property name="groupName" value="oegress"/>
>> >>>                     <property name="name" value="lincs_cache"/>
>> >>>                     <property name="sqlSchema" value="lincs"/>
>> >>>                     <property name="cacheMode" value="PARTITIONED"/>
>> >>>                     <property name="atomicityMode" value="ATOMIC"/>
>> >>>                     <property name="backups" value="0"/>
>> >>>                     <property name="readFromBackup" value="true"/>
>> >>>                     <property name="copyOnRead" value="true"/>
>> >>>                     <property name="readThrough" value="true"/>
>> >>>                     <property name="writeThrough" value="true"/>
>> >>>                     <property name="cacheStoreFactory">
>> >>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>> >>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>> >>>                         </bean>
>> >>>                     </property>
>> >>>                     <property name="queryEntities">
>> >>>                         <list>
>> >>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>> >>>                                 <property name="keyType" value="java.lang.String"></property>
>> >>>                                 <property name="valueType" value="com.domain.Account"></property>
>> >>>                                 <property name="fields">
>> >>>                                     <map>
>> >>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>> >>>                                         <entry key="firstName" value="java.lang.String"></entry>
>> >>>                                         <entry key="lastName" value="java.lang.String"></entry>
>> >>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>> >>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>> >>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>> >>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>> >>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>> >>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>> >>>                                     </map>
>> >>>                                 </property>
>> >>>                             </bean>
>> >>>                         </list>
>> >>>                     </property>
>> >>>                 </bean>
>> >>>             </list>
>> >>>         </property>
>> >>>     </bean>
>> >>>
>> >>>
>> >>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>> >>>>
>> >>>> Hello!
>> >>>>
>> >>>> This is strange. What's cache configuration? Is there a reproducer? Did you change the code between restarts, including key/value types, if any?
>> >>>>
>> >>>> Regards,
>> >>>> --
>> >>>> Ilya Kasnacheev
>> >>>>
>> >>>>
>> >>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>> >>>>>
>> >>>>> Yes , the query worked before restart.
>> >>>>>
>> >>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>> >>>>>>
>> >>>>>> Hello!
>> >>>>>>
>> >>>>>> Does the query work before the restart?
>> >>>>>>
>> >>>>>> Regards,
>> >>>>>>
>> >>>>>> --
>> >>>>>> Ilya Kasnacheev
>> >>>>>>
>> >>>>>>
>> >>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>> >>>>>>>
>> >>>>>>> Hi,
>> >>>>>>>
>> >>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded the cache with 10 million records.
>> >>>>>>> Once I do a cache restart, I get an empty response when I query the cache.
>> >>>>>>> But when I check cache size it gives me 10 million record count in cache.
>> >>>>>>> Any suggestions?
>> >>>>>>>
>> >>>>>>> Thanks
>> >>
>> >>
>> >>
>> >> --
>> >> -
>> >> Denis
>> >>
>>
>>
>> --
>> Best regards,
>> Ivan Pavlukhin



-- 
Best regards,
Ivan Pavlukhin

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
It didn't work as expected, tried disable/enable WAL too, still I see the
same behavior.

On Mon, Jun 24, 2019 at 7:32 AM Павлухин Иван <vo...@gmail.com> wrote:

> Hi Goutham,
>
> I did not get from your last message does it work now as expected? If
> not does it work without a trick with disable/enable WAL?
>
> ср, 19 июн. 2019 г. в 19:18, goutham manchikatla <ga...@gmail.com>:
> >
> > Hi Denis,
> >
> > I tried removing Default_Region name property from config, still I see
> the same behavior. But when I trigger load_cache process, and query the
> cache(after a complete cluster restart) , I am getting the response.
> >
> > Below is the Load_cache process.
> >  try (Ignite ignite = Ignition.start(configFile)) {
> >
> >
> > // Start loading cache on all caching nodes.
> >
> > final IgniteCache<String, Account> cache = ignite.cache(cacheName);
> >
> > long ts = System.currentTimeMillis();
> >
> >
> > IgniteCluster cluster = ignite.cluster();
> >
> > cluster.disableWal(cacheName);
> >
> >
> > LOG.info("Disabling WAL for Initial Data Loading");
> >
> >
> > cache.loadCache(null, ignite, cacheName, sqlquery);
> >
> >
> > LOG.info("Loaded Cache in " + (System.currentTimeMillis() - ts) + "
> millisecs");
> >
> >
> > cluster.enableWal(cacheName);
> >
> >
> > LOG.info("Enabling WAL after the pre-loading is complete");
> >
> > }
> >
> >
> > Thanks,
> >
> > Goutham
> >
> >
> > On Tue, Jun 18, 2019 at 8:45 PM Denis Magda <dm...@apache.org> wrote:
> >>
> >> Try to remove Default_Region name property from your config. If to
> follow this example that’s how persistence is enabled for the default
> region:
> >> https://apacheignite.readme.io/docs/distributed-persistent-store
> >>
> >> Denis
> >>
> >>
> >> On Thursday, June 6, 2019, goutham manchikatla <ga...@gmail.com>
> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I didn't change any code between restarts. Below is the configuration.
> >>>
> >>> <property name="dataStorageConfiguration">
> >>>             <bean
> class="org.apache.ignite.configuration.DataStorageConfiguration">
> >>>                 <property name="concurrencyLevel" value="4"/>
> >>>                 <property name="walHistorySize" value="2"/>
> >>>                <property name="writeThrottlingEnabled" value="true"/>
> >>>                 <property name="pageSize" value="#{4 * 1024}"/>
> >>>                 <property name="defaultDataRegionConfiguration">
> >>>                     <bean
> class="org.apache.ignite.configuration.DataRegionConfiguration">
> >>>                         <property name="name" value="Default_Region"/>
> >>>                         <property name="initialSize" value="#{100 *
> 1024 * 1024}"/>
> >>>                     </bean>
> >>>                 </property>
> >>>                 <property name="dataRegionConfigurations">
> >>>                     <list>
> >>>                         <bean
> class="org.apache.ignite.configuration.DataRegionConfiguration">
> >>>                             <property name="name"
> value="500MB_Region"/>
> >>>                             <!-- Memory region of 600 MB initial size.
> -->
> >>>                             <property name="initialSize" value="#{600
> * 1024 * 1024}"/>
> >>>                             <!-- Maximum size is 10GB. -->
> >>>                             <property name="maxSize" value="#{10L *
> 1024 * 1024 * 1024}"/>
> >>>                             <!-- Enabling persistence for the region
> -->
> >>>                             <property name="persistenceEnabled"
> value="true"/>
> >>>                             <!-- Enabling RANDOM_LRU eviction for this
> region. -->
> >>>                             <property name="pageEvictionMode"
> value="RANDOM_LRU"/>
> >>>                             <!-- Increasing the buffer size to 1 GB.
> -->
> >>>                             <property name="checkpointPageBufferSize"
> value="#{1024L * 1024 * 1024}"/>
> >>>                         </bean>
> >>>                     </list>
> >>>                 </property>
> >>>             </bean>
> >>>         </property>
> >>>         <!-- Enabling authentication. -->
> >>>         <property name="authenticationEnabled" value="true"/>
> >>>         <!-- cache configuration -->
> >>>         <property name="cacheConfiguration">
> >>>             <list>
> >>>                 <!-- partitioned cache configuration. -->
> >>>                 <bean
> class="org.apache.ignite.configuration.CacheConfiguration">
> >>>                     <property name="dataRegionName"
> value="500MB_Region"/>
> >>>                     <property name="groupName" value="oegress"/>
> >>>                     <property name="name" value="lincs_cache"/>
> >>>                     <property name="sqlSchema" value="lincs"/>
> >>>                     <property name="cacheMode" value="PARTITIONED"/>
> >>>                     <property name="atomicityMode" value="ATOMIC"/>
> >>>                     <property name="backups" value="0"/>
> >>>                     <property name="readFromBackup" value="true"/>
> >>>                     <property name="copyOnRead" value="true"/>
> >>>                     <property name="readThrough" value="true"/>
> >>>                     <property name="writeThrough" value="true"/>
> >>>                     <property name="cacheStoreFactory">
> >>>                         <bean
> class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
> >>>                             <constructor-arg
> value="com.cachestore.AccountCacheStore"></constructor-arg>
> >>>                         </bean>
> >>>                     </property>
> >>>                     <property name="queryEntities">
> >>>                         <list>
> >>>                             <bean
> class="org.apache.ignite.cache.QueryEntity">
> >>>                                 <property name="keyType"
> value="java.lang.String"></property>
> >>>                                 <property name="valueType"
> value="com.domain.Account"></property>
> >>>                                 <property name="fields">
> >>>                                     <map>
> >>>                                         <entry key="accountNumber"
> value="java.lang.String"></entry>
> >>>                                         <entry key="firstName"
> value="java.lang.String"></entry>
> >>>                                         <entry key="lastName"
> value="java.lang.String"></entry>
> >>>                                         <entry key="servAddrLine1"
> value="java.lang.String"></entry>
> >>>                                         <entry key="servAddrLine2"
> value="java.lang.String"></entry>
> >>>                                         <entry key="servAddrCity"
> value="java.lang.String"></entry>
> >>>                                         <entry key="servAddrState"
> value="java.lang.String"></entry>
> >>>                                         <entry key="servAddrZip"
> value="java.lang.String"></entry>
> >>>                                         <entry key="billingSystem"
> value="java.lang.String"></entry>
> >>>                                     </map>
> >>>                                 </property>
> >>>                             </bean>
> >>>                         </list>
> >>>                     </property>
> >>>                 </bean>
> >>>             </list>
> >>>         </property>
> >>>     </bean>
> >>>
> >>>
> >>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <
> ilya.kasnacheev@gmail.com> wrote:
> >>>>
> >>>> Hello!
> >>>>
> >>>> This is strange. What's cache configuration? Is there a reproducer?
> Did you change the code between restarts, including key/value types, if any?
> >>>>
> >>>> Regards,
> >>>> --
> >>>> Ilya Kasnacheev
> >>>>
> >>>>
> >>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
> >>>>>
> >>>>> Yes , the query worked before restart.
> >>>>>
> >>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
> ilya.kasnacheev@gmail.com> wrote:
> >>>>>>
> >>>>>> Hello!
> >>>>>>
> >>>>>> Does the query work before the restart?
> >>>>>>
> >>>>>> Regards,
> >>>>>>
> >>>>>> --
> >>>>>> Ilya Kasnacheev
> >>>>>>
> >>>>>>
> >>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <gauti06@gmail.com
> >:
> >>>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I have an Ignite SQL cache setup with persistence enabled and
> loaded the cache with 10 million records.
> >>>>>>> Once I do a cache restart, I get an empty response when I query
> the cache.
> >>>>>>> But when I check cache size it gives me 10 million record count in
> cache.
> >>>>>>> Any suggestions?
> >>>>>>>
> >>>>>>> Thanks
> >>
> >>
> >>
> >> --
> >> -
> >> Denis
> >>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>

Re: unable to query the cache after restart

Posted by Павлухин Иван <vo...@gmail.com>.
Hi Goutham,

I did not get from your last message does it work now as expected? If
not does it work without a trick with disable/enable WAL?

ср, 19 июн. 2019 г. в 19:18, goutham manchikatla <ga...@gmail.com>:
>
> Hi Denis,
>
> I tried removing Default_Region name property from config, still I see the same behavior. But when I trigger load_cache process, and query the cache(after a complete cluster restart) , I am getting the response.
>
> Below is the Load_cache process.
>  try (Ignite ignite = Ignition.start(configFile)) {
>
>
> // Start loading cache on all caching nodes.
>
> final IgniteCache<String, Account> cache = ignite.cache(cacheName);
>
> long ts = System.currentTimeMillis();
>
>
> IgniteCluster cluster = ignite.cluster();
>
> cluster.disableWal(cacheName);
>
>
> LOG.info("Disabling WAL for Initial Data Loading");
>
>
> cache.loadCache(null, ignite, cacheName, sqlquery);
>
>
> LOG.info("Loaded Cache in " + (System.currentTimeMillis() - ts) + " millisecs");
>
>
> cluster.enableWal(cacheName);
>
>
> LOG.info("Enabling WAL after the pre-loading is complete");
>
> }
>
>
> Thanks,
>
> Goutham
>
>
> On Tue, Jun 18, 2019 at 8:45 PM Denis Magda <dm...@apache.org> wrote:
>>
>> Try to remove Default_Region name property from your config. If to follow this example that’s how persistence is enabled for the default region:
>> https://apacheignite.readme.io/docs/distributed-persistent-store
>>
>> Denis
>>
>>
>> On Thursday, June 6, 2019, goutham manchikatla <ga...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I didn't change any code between restarts. Below is the configuration.
>>>
>>> <property name="dataStorageConfiguration">
>>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>>                 <property name="concurrencyLevel" value="4"/>
>>>                 <property name="walHistorySize" value="2"/>
>>>                <property name="writeThrottlingEnabled" value="true"/>
>>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>>                 <property name="defaultDataRegionConfiguration">
>>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>                         <property name="name" value="Default_Region"/>
>>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>>                     </bean>
>>>                 </property>
>>>                 <property name="dataRegionConfigurations">
>>>                     <list>
>>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>>                             <property name="name" value="500MB_Region"/>
>>>                             <!-- Memory region of 600 MB initial size. -->
>>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>>                             <!-- Maximum size is 10GB. -->
>>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>>                             <!-- Enabling persistence for the region -->
>>>                             <property name="persistenceEnabled" value="true"/>
>>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>>                             <!-- Increasing the buffer size to 1 GB. -->
>>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>>                         </bean>
>>>                     </list>
>>>                 </property>
>>>             </bean>
>>>         </property>
>>>         <!-- Enabling authentication. -->
>>>         <property name="authenticationEnabled" value="true"/>
>>>         <!-- cache configuration -->
>>>         <property name="cacheConfiguration">
>>>             <list>
>>>                 <!-- partitioned cache configuration. -->
>>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>>                     <property name="dataRegionName" value="500MB_Region"/>
>>>                     <property name="groupName" value="oegress"/>
>>>                     <property name="name" value="lincs_cache"/>
>>>                     <property name="sqlSchema" value="lincs"/>
>>>                     <property name="cacheMode" value="PARTITIONED"/>
>>>                     <property name="atomicityMode" value="ATOMIC"/>
>>>                     <property name="backups" value="0"/>
>>>                     <property name="readFromBackup" value="true"/>
>>>                     <property name="copyOnRead" value="true"/>
>>>                     <property name="readThrough" value="true"/>
>>>                     <property name="writeThrough" value="true"/>
>>>                     <property name="cacheStoreFactory">
>>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>>                         </bean>
>>>                     </property>
>>>                     <property name="queryEntities">
>>>                         <list>
>>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>>                                 <property name="keyType" value="java.lang.String"></property>
>>>                                 <property name="valueType" value="com.domain.Account"></property>
>>>                                 <property name="fields">
>>>                                     <map>
>>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>>                                     </map>
>>>                                 </property>
>>>                             </bean>
>>>                         </list>
>>>                     </property>
>>>                 </bean>
>>>             </list>
>>>         </property>
>>>     </bean>
>>>
>>>
>>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>
>>>> Hello!
>>>>
>>>> This is strange. What's cache configuration? Is there a reproducer? Did you change the code between restarts, including key/value types, if any?
>>>>
>>>> Regards,
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>> Yes , the query worked before restart.
>>>>>
>>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com> wrote:
>>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> Does the query work before the restart?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> --
>>>>>> Ilya Kasnacheev
>>>>>>
>>>>>>
>>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded the cache with 10 million records.
>>>>>>> Once I do a cache restart, I get an empty response when I query the cache.
>>>>>>> But when I check cache size it gives me 10 million record count in cache.
>>>>>>> Any suggestions?
>>>>>>>
>>>>>>> Thanks
>>
>>
>>
>> --
>> -
>> Denis
>>


-- 
Best regards,
Ivan Pavlukhin

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
Hi Denis,

I tried removing Default_Region name property from config, still I see the
same behavior. But when I trigger load_cache process, and query the
cache(after a complete cluster restart) , I am getting the response.

Below is the Load_cache process.
 *try* (Ignite ignite = Ignition.*start*(configFile)) {


// Start loading cache on all caching nodes.

*final* IgniteCache<String, Account> cache = ignite.cache(cacheName);

*long* ts = System.*currentTimeMillis*();


IgniteCluster cluster = ignite.cluster();

cluster.disableWal(cacheName);


*LOG*.info("Disabling WAL for Initial Data Loading");


cache.loadCache(*null*, ignite, cacheName, sqlquery);


*LOG*.info("Loaded Cache in " + (System.*currentTimeMillis*() - ts) + "
millisecs");


cluster.enableWal(cacheName);


*LOG*.info("Enabling WAL after the pre-loading is complete");

}


Thanks,

Goutham

On Tue, Jun 18, 2019 at 8:45 PM Denis Magda <dm...@apache.org> wrote:

> Try to remove Default_Region name property from your config. If to follow
> this example that’s how persistence is enabled for the default region:
> https://apacheignite.readme.io/docs/distributed-persistent-store
>
> Denis
>
>
> On Thursday, June 6, 2019, goutham manchikatla <ga...@gmail.com> wrote:
>
>> Hi,
>>
>> I didn't change any code between restarts. Below is the configuration.
>>
>> <property name="dataStorageConfiguration">
>>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>>                 <property name="concurrencyLevel" value="4"/>
>>                 <property name="walHistorySize" value="2"/>
>>                <property name="writeThrottlingEnabled" value="true"/>
>>                 <property name="pageSize" value="#{4 * 1024}"/>
>>                 <property name="defaultDataRegionConfiguration">
>>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>                         <property name="name" value="Default_Region"/>
>>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>>                     </bean>
>>                 </property>
>>                 <property name="dataRegionConfigurations">
>>                     <list>
>>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>>                             <property name="name" value="500MB_Region"/>
>>                             <!-- Memory region of 600 MB initial size. -->
>>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>>                             <!-- Maximum size is 10GB. -->
>>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>>                             <!-- Enabling persistence for the region -->
>>                             <property name="persistenceEnabled" value="true"/>
>>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>>                             <!-- Increasing the buffer size to 1 GB. -->
>>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>>                         </bean>
>>                     </list>
>>                 </property>
>>             </bean>
>>         </property>
>>         <!-- Enabling authentication. -->
>>         <property name="authenticationEnabled" value="true"/>
>>         <!-- cache configuration -->
>>         <property name="cacheConfiguration">
>>             <list>
>>                 <!-- partitioned cache configuration. -->
>>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>>                     <property name="dataRegionName" value="500MB_Region"/>
>>                     <property name="groupName" value="oegress"/>
>>                     <property name="name" value="lincs_cache"/>
>>                     <property name="sqlSchema" value="lincs"/>
>>                     <property name="cacheMode" value="PARTITIONED"/>
>>                     <property name="atomicityMode" value="ATOMIC"/>
>>                     <property name="backups" value="0"/>
>>                     <property name="readFromBackup" value="true"/>
>>                     <property name="copyOnRead" value="true"/>
>>                     <property name="readThrough" value="true"/>
>>                     <property name="writeThrough" value="true"/>
>>                     <property name="cacheStoreFactory">
>>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>>                         </bean>
>>                     </property>
>>                     <property name="queryEntities">
>>                         <list>
>>                             <bean class="org.apache.ignite.cache.QueryEntity">
>>                                 <property name="keyType" value="java.lang.String"></property>
>>                                 <property name="valueType" value="com.domain.Account"></property>
>>                                 <property name="fields">
>>                                     <map>
>>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>>                                         <entry key="firstName" value="java.lang.String"></entry>
>>                                         <entry key="lastName" value="java.lang.String"></entry>
>>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>>                                     </map>
>>                                 </property>
>>                             </bean>
>>                         </list>
>>                     </property>
>>                 </bean>
>>             </list>
>>         </property>
>>     </bean>
>>
>>
>> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> This is strange. What's cache configuration? Is there a reproducer? Did
>>> you change the code between restarts, including key/value types, if any?
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>>
>>>> Yes , the query worked before restart.
>>>>
>>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>>> ilya.kasnacheev@gmail.com> wrote:
>>>>
>>>>> Hello!
>>>>>
>>>>> Does the query work before the restart?
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Ilya Kasnacheev
>>>>>
>>>>>
>>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>>>> the cache with 10 million records.
>>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>>> cache.
>>>>>> But when I check cache size it gives me 10 million record count in
>>>>>> cache.
>>>>>> Any suggestions?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>
>
> --
> -
> Denis
>
>

Re: unable to query the cache after restart

Posted by Denis Magda <dm...@apache.org>.
Try to remove Default_Region name property from your config. If to follow
this example that’s how persistence is enabled for the default region:
https://apacheignite.readme.io/docs/distributed-persistent-store

Denis


On Thursday, June 6, 2019, goutham manchikatla <ga...@gmail.com> wrote:

> Hi,
>
> I didn't change any code between restarts. Below is the configuration.
>
> <property name="dataStorageConfiguration">
>             <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
>                 <property name="concurrencyLevel" value="4"/>
>                 <property name="walHistorySize" value="2"/>
>                <property name="writeThrottlingEnabled" value="true"/>
>                 <property name="pageSize" value="#{4 * 1024}"/>
>                 <property name="defaultDataRegionConfiguration">
>                     <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>                         <property name="name" value="Default_Region"/>
>                         <property name="initialSize" value="#{100 * 1024 * 1024}"/>
>                     </bean>
>                 </property>
>                 <property name="dataRegionConfigurations">
>                     <list>
>                         <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
>                             <property name="name" value="500MB_Region"/>
>                             <!-- Memory region of 600 MB initial size. -->
>                             <property name="initialSize" value="#{600 * 1024 * 1024}"/>
>                             <!-- Maximum size is 10GB. -->
>                             <property name="maxSize" value="#{10L * 1024 * 1024 * 1024}"/>
>                             <!-- Enabling persistence for the region -->
>                             <property name="persistenceEnabled" value="true"/>
>                             <!-- Enabling RANDOM_LRU eviction for this region. -->
>                             <property name="pageEvictionMode" value="RANDOM_LRU"/>
>                             <!-- Increasing the buffer size to 1 GB. -->
>                             <property name="checkpointPageBufferSize" value="#{1024L * 1024 * 1024}"/>
>                         </bean>
>                     </list>
>                 </property>
>             </bean>
>         </property>
>         <!-- Enabling authentication. -->
>         <property name="authenticationEnabled" value="true"/>
>         <!-- cache configuration -->
>         <property name="cacheConfiguration">
>             <list>
>                 <!-- partitioned cache configuration. -->
>                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="dataRegionName" value="500MB_Region"/>
>                     <property name="groupName" value="oegress"/>
>                     <property name="name" value="lincs_cache"/>
>                     <property name="sqlSchema" value="lincs"/>
>                     <property name="cacheMode" value="PARTITIONED"/>
>                     <property name="atomicityMode" value="ATOMIC"/>
>                     <property name="backups" value="0"/>
>                     <property name="readFromBackup" value="true"/>
>                     <property name="copyOnRead" value="true"/>
>                     <property name="readThrough" value="true"/>
>                     <property name="writeThrough" value="true"/>
>                     <property name="cacheStoreFactory">
>                         <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
>                             <constructor-arg value="com.cachestore.AccountCacheStore"></constructor-arg>
>                         </bean>
>                     </property>
>                     <property name="queryEntities">
>                         <list>
>                             <bean class="org.apache.ignite.cache.QueryEntity">
>                                 <property name="keyType" value="java.lang.String"></property>
>                                 <property name="valueType" value="com.domain.Account"></property>
>                                 <property name="fields">
>                                     <map>
>                                         <entry key="accountNumber" value="java.lang.String"></entry>
>                                         <entry key="firstName" value="java.lang.String"></entry>
>                                         <entry key="lastName" value="java.lang.String"></entry>
>                                         <entry key="servAddrLine1" value="java.lang.String"></entry>
>                                         <entry key="servAddrLine2" value="java.lang.String"></entry>
>                                         <entry key="servAddrCity" value="java.lang.String"></entry>
>                                         <entry key="servAddrState" value="java.lang.String"></entry>
>                                         <entry key="servAddrZip" value="java.lang.String"></entry>
>                                         <entry key="billingSystem" value="java.lang.String"></entry>
>                                     </map>
>                                 </property>
>                             </bean>
>                         </list>
>                     </property>
>                 </bean>
>             </list>
>         </property>
>     </bean>
>
>
> On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> This is strange. What's cache configuration? Is there a reproducer? Did
>> you change the code between restarts, including key/value types, if any?
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>>
>>> Yes , the query worked before restart.
>>>
>>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <
>>> ilya.kasnacheev@gmail.com> wrote:
>>>
>>>> Hello!
>>>>
>>>> Does the query work before the restart?
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Ilya Kasnacheev
>>>>
>>>>
>>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>>> the cache with 10 million records.
>>>>> Once I do a cache restart, I get an empty response when I query the
>>>>> cache.
>>>>> But when I check cache size it gives me 10 million record count in
>>>>> cache.
>>>>> Any suggestions?
>>>>>
>>>>> Thanks
>>>>>
>>>>

-- 
-
Denis

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
Hi,

I didn't change any code between restarts. Below is the configuration.

<property name="dataStorageConfiguration">
            <bean
class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="concurrencyLevel" value="4"/>
                <property name="walHistorySize" value="2"/>
               <property name="writeThrottlingEnabled" value="true"/>
                <property name="pageSize" value="#{4 * 1024}"/>
                <property name="defaultDataRegionConfiguration">
                    <bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="name" value="Default_Region"/>
                        <property name="initialSize" value="#{100 *
1024 * 1024}"/>
                    </bean>
                </property>
                <property name="dataRegionConfigurations">
                    <list>
                        <bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
                            <property name="name" value="500MB_Region"/>
                            <!-- Memory region of 600 MB initial size. -->
                            <property name="initialSize" value="#{600
* 1024 * 1024}"/>
                            <!-- Maximum size is 10GB. -->
                            <property name="maxSize" value="#{10L *
1024 * 1024 * 1024}"/>
                            <!-- Enabling persistence for the region -->
                            <property name="persistenceEnabled" value="true"/>
                            <!-- Enabling RANDOM_LRU eviction for this
region. -->
                            <property name="pageEvictionMode"
value="RANDOM_LRU"/>
                            <!-- Increasing the buffer size to 1 GB. -->
                            <property name="checkpointPageBufferSize"
value="#{1024L * 1024 * 1024}"/>
                        </bean>
                    </list>
                </property>
            </bean>
        </property>
        <!-- Enabling authentication. -->
        <property name="authenticationEnabled" value="true"/>
        <!-- cache configuration -->
        <property name="cacheConfiguration">
            <list>
                <!-- partitioned cache configuration. -->
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="dataRegionName" value="500MB_Region"/>
                    <property name="groupName" value="oegress"/>
                    <property name="name" value="lincs_cache"/>
                    <property name="sqlSchema" value="lincs"/>
                    <property name="cacheMode" value="PARTITIONED"/>
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="0"/>
                    <property name="readFromBackup" value="true"/>
                    <property name="copyOnRead" value="true"/>
                    <property name="readThrough" value="true"/>
                    <property name="writeThrough" value="true"/>
                    <property name="cacheStoreFactory">
                        <bean
class="javax.cache.configuration.FactoryBuilder"
factory-method="factoryOf">
                            <constructor-arg
value="com.cachestore.AccountCacheStore"></constructor-arg>
                        </bean>
                    </property>
                    <property name="queryEntities">
                        <list>
                            <bean class="org.apache.ignite.cache.QueryEntity">
                                <property name="keyType"
value="java.lang.String"></property>
                                <property name="valueType"
value="com.domain.Account"></property>
                                <property name="fields">
                                    <map>
                                        <entry key="accountNumber"
value="java.lang.String"></entry>
                                        <entry key="firstName"
value="java.lang.String"></entry>
                                        <entry key="lastName"
value="java.lang.String"></entry>
                                        <entry key="servAddrLine1"
value="java.lang.String"></entry>
                                        <entry key="servAddrLine2"
value="java.lang.String"></entry>
                                        <entry key="servAddrCity"
value="java.lang.String"></entry>
                                        <entry key="servAddrState"
value="java.lang.String"></entry>
                                        <entry key="servAddrZip"
value="java.lang.String"></entry>
                                        <entry key="billingSystem"
value="java.lang.String"></entry>
                                    </map>
                                </property>
                            </bean>
                        </list>
                    </property>
                </bean>
            </list>
        </property>
    </bean>


On Thu, Jun 6, 2019 at 8:32 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> This is strange. What's cache configuration? Is there a reproducer? Did
> you change the code between restarts, including key/value types, if any?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:
>
>> Yes , the query worked before restart.
>>
>> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com>
>> wrote:
>>
>>> Hello!
>>>
>>> Does the query work before the restart?
>>>
>>> Regards,
>>>
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>>
>>>> Hi,
>>>>
>>>> I have an Ignite SQL cache setup with persistence enabled and loaded
>>>> the cache with 10 million records.
>>>> Once I do a cache restart, I get an empty response when I query the
>>>> cache.
>>>> But when I check cache size it gives me 10 million record count in
>>>> cache.
>>>> Any suggestions?
>>>>
>>>> Thanks
>>>>
>>>

Re: unable to query the cache after restart

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

This is strange. What's cache configuration? Is there a reproducer? Did you
change the code between restarts, including key/value types, if any?

Regards,
-- 
Ilya Kasnacheev


чт, 6 июн. 2019 г. в 16:16, goutham manchikatla <ga...@gmail.com>:

> Yes , the query worked before restart.
>
> On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com>
> wrote:
>
>> Hello!
>>
>> Does the query work before the restart?
>>
>> Regards,
>>
>> --
>> Ilya Kasnacheev
>>
>>
>> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>>
>>> Hi,
>>>
>>> I have an Ignite SQL cache setup with persistence enabled and loaded the
>>> cache with 10 million records.
>>> Once I do a cache restart, I get an empty response when I query the
>>> cache.
>>> But when I check cache size it gives me 10 million record count in
>>> cache.
>>> Any suggestions?
>>>
>>> Thanks
>>>
>>

Re: unable to query the cache after restart

Posted by goutham manchikatla <ga...@gmail.com>.
Yes , the query worked before restart.

On Thu, Jun 6, 2019 at 4:16 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> Does the query work before the restart?
>
> Regards,
>
> --
> Ilya Kasnacheev
>
>
> ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:
>
>> Hi,
>>
>> I have an Ignite SQL cache setup with persistence enabled and loaded the
>> cache with 10 million records.
>> Once I do a cache restart, I get an empty response when I query the
>> cache.
>> But when I check cache size it gives me 10 million record count in cache.
>> Any suggestions?
>>
>> Thanks
>>
>

Re: unable to query the cache after restart

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Does the query work before the restart?

Regards,
-- 
Ilya Kasnacheev


ср, 5 июн. 2019 г. в 22:37, goutham manchikatla <ga...@gmail.com>:

> Hi,
>
> I have an Ignite SQL cache setup with persistence enabled and loaded the
> cache with 10 million records.
> Once I do a cache restart, I get an empty response when I query the cache.
> But when I check cache size it gives me 10 million record count in cache.
> Any suggestions?
>
> Thanks
>