You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "aaron@tophold.com" <aa...@tophold.com> on 2017/07/20 03:35:25 UTC

issue in REPLICATED model cache between server and client

hi All, 

I have a cache of REPLICATED in server side, which with a customized memory policy defined;

And a client will query against this Cache.  the client Ignite just a default Ignite instance with the Client Mode as True.  but it failed to init;

So the client must supply the memory policy also? 




Another issue the ignite.cache(name) seems can not fail automatically,   when client call ignite.cacheNames();  we can find the cache defined remote there, but when call #cache() it block there never came back. 

----------------------

Client:

IgniteSpring.start(new IgniteConfiguration().setClientMode(true).setIgniteInstanceName(INSTANCE_NM), ctx)

Server:

portfolioNodeFilter:  user attributes:  ignite.node.event.listener   must be  "AccountEntry"

<bean class="org.apache.ignite.configuration.CacheConfiguration" id="AccountEntry">
        <property name="name" value="AccountEntry"/>
        <property name="cacheMode" value="REPLICATED"/>
        <property name="atomicityMode" value="ATOMIC"/>
        <property name="readFromBackup" value="true"/>

        <property name="readThrough" value="true"/>
        <property name="writeThrough" value="true"/>
        <property name="storeKeepBinary" value="true"/>
        <property name="onheapCacheEnabled" value="true"/>
        <property name="memoryPolicyName" value="Account_Region"/>

        <property name="evictionPolicy">
            <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                <property name="maxSize" value="500000"/>
            </bean>
        </property>
        <property name="cacheStoreFactory" ref="factory"/>
        <property name="queryEntities">
            <list>
                <ref bean="queryEntities"/>
            </list>
        </property>
        <property name="nodeFilter" ref="portfolioNodeFilter"/>
    </bean>

----------------------

What's more If I open the debug mode find a lot log says:

[DEBUG] 2017-07-20 02:05:16.894 [grid-timeout-worker-#23%WebIgnite%] [ig] GridTimeoutProcessor - Timeout has occurred: GridCommunicationMessageSet [nodeId=eedf67fb-6a01-4eb3-b4ac-e23446181ca9, endTime=1500516316887, timeoutId=24a304d5d51-49983eab-7747-47a8-912d-d06b45404385, topic=T4 [topic=TOPIC_CACHE, id1=5dc785b4-dd3d-3c3b-b270-c5fe2d7ed9a2, id2=e90fb911-c52d-440a-a651-8f624ac7ece5, id3=1], plc=2, msgs=[], reserved=false, timeout=5000, skipOnTimeout=true, lastTs=1500508078116]

the TOPIC_CACHE suppose to listener the CACHE change in the grid?    but in fact during that moment we did not change anything of any cache; it almost is empty.  also our test nodes all in a same host, in theory timeout should rarely happen! 

Thanks again for your time and be patient! 

Regards
Aaron


aaron@tophold.com

Re: Re: issue in REPLICATED model cache between server and client

Posted by vkulichenko <va...@gmail.com>.
Can you provide a reproducer?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/issue-in-REPLICATED-model-cache-between-server-and-client-tp15154p15256.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re: issue in REPLICATED model cache between server and client

Posted by "aaron@tophold.com" <aa...@tophold.com>.
hi Val, 

like this:

<bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
    <property name="name" value="Account_Region"/>
    <property name="initialSize" value="#{100 * 1024 * 1024}"/>
    <property name="maxSize" value="#{200 * 1024 * 1024}"/>
    <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
    <property name="swapFilePath" value="./swap/account.data"/>
</bean>


Regards
Aaron


aaron@tophold.com
 
From: vkulichenko
Date: 2017-07-21 03:15
To: user
Subject: Re: issue in REPLICATED model cache between server and client
Aaron,
 
Memory policy is not required on client, but it must be configured on
server. Do you have memory policy configuration for Account_Region?
 
Take a look at MemoryPoliciesExample, it demonstrates how to do this.
 
-Val
 
 
 
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/issue-in-REPLICATED-model-cache-between-server-and-client-tp15154p15204.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: issue in REPLICATED model cache between server and client

Posted by vkulichenko <va...@gmail.com>.
Aaron,

Memory policy is not required on client, but it must be configured on
server. Do you have memory policy configuration for Account_Region?

Take a look at MemoryPoliciesExample, it demonstrates how to do this.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/issue-in-REPLICATED-model-cache-between-server-and-client-tp15154p15204.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.