You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by 张鹏鹏 <zh...@gmail.com> on 2016/05/17 05:03:30 UTC

IgniteCache method replace(key,newVal) behave different with replace(key,oldVal,newVal)

Are there some different between the IgniteCache  two replace methods?

In my test:

If I call the replace(key,newVal),it's ok.
but if I call replace(key,oldVal,newVal) ,there is an exception throws.

org.apache.ignite.cache.CachePartialUpdateException: Failed to update keys
(retry update if possible).:
[542c87f7-1972-4682-9ae9-5fd603a33cd3:6b90e675-c55d-4734-9de7-44301670f64e]

It's the config:

            <bean
class="org.apache.ignite.configuration.CacheConfiguration">
              <property name="name" value="UserInfoCache"/>
              <property name="cacheMode" value="PARTITIONED"/>
              <property name="backups" value="1"/>
              <property name="atomicityMode" value="ATOMIC"/>
              <property name="atomicWriteOrderMode" value="PRIMARY"/>
              <property name="memoryMode" value="ONHEAP_TIERED"/>
              <property name="offHeapMaxMemory" value="#{1 * 1024L * 1024L
* 1024L}"/>
              <property name="SqlOnheapRowCacheSize" value="100000"/>
              <property name="queryEntities">
                <list>
                  <bean class="org.apache.ignite.cache.QueryEntity">
                    <property name="keyType" value="java.lang.String"/>
                    <property name="valueType"
value="com.tvm.db.tables.pojos.Userinfo"/>
                    <property name="fields">
                      <map>
                        <entry key="id" value="java.lang.String"/>
                        <entry key="openid" value="java.lang.String"/>
                        <entry key="yyyappid" value="java.lang.String"/>
                        <entry key="virtualcurrency"
value="java.lang.Long"/>
                      </map>
                    </property>
                    <property name="indexes">
                      <bean class="org.apache.ignite.cache.QueryIndex">
                        <constructor-arg>
                          <list>
                            <value>openid</value>
                            <value>yyyappid</value>
                            <value>virtualcurrency</value>
                          </list>
                        </constructor-arg>
                        <constructor-arg value="SORTED"/>
                      </bean>
                    </property>
                  </bean>
                </list>
              </property>
              <property name="evictionPolicy">
                <bean
class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                  <property name="maxSize" value="1000000"/>
                </bean>
              </property>
            </bean>



Is there something wrong?

Re: IgniteCache method replace(key,newVal) behave different with replace(key,oldVal,newVal)

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

This trace is still not full. There should be also the root cause which
happened on primary node and should be attached to this one. If it's not the
case, please also check server node logs.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteCache-method-replace-key-newVal-behave-different-with-replace-key-oldVal-newVal-tp4986p5037.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: IgniteCache method replace(key,newVal) behave different with replace(key,oldVal,newVal)

Posted by 张鹏鹏 <zh...@gmail.com>.
Sure!


org.apache.ignite.cache.CachePartialUpdateException: Failed to update keys
(retry update if possible).:
[ef76d38e-63a9-4d49-b6ca-45b5262497eb:73fb36c5-0f7b-40cf-8ccd-9a167c55af72]
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.convertToCacheException(GridCacheUtils.java:1604)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.cacheException(IgniteCacheProxy.java:1841)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.IgniteCacheProxy.replace(IgniteCacheProxy.java:1251)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
com.tvm.moneySystem.control.impl.DbMoneyStore.updateUserInfoCache(DbMoneyStore.java:188)
[money-logic/:?]
at
com.tvm.moneySystem.control.impl.DbMoneyStore.lambda$null$4(DbMoneyStore.java:110)
[money-logic/:?]
at
com.tvm.moneySystem.control.impl.DbMoneyStore$$Lambda$30/1950829481.call(Unknown
Source) [money-logic/:?]
at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
[rxjava-1.0.14.jar:1.0.14]
at
io.vertx.rx.java.SingleOnSubscribeAdapter.fireNext(SingleOnSubscribeAdapter.java:53)
[vertx-rx-java-3.2.0.jar:?]
at io.vertx.rx.java.ObservableFuture$1.dispatch(ObservableFuture.java:58)
[vertx-rx-java-3.2.0.jar:?]
at
io.vertx.rx.java.ObservableFuture$HandlerAdapter.handle(ObservableFuture.java:32)
[vertx-rx-java-3.2.0.jar:?]
at
io.vertx.rx.java.ObservableFuture$HandlerAdapter.handle(ObservableFuture.java:12)
[vertx-rx-java-3.2.0.jar:?]
at io.vertx.core.impl.FutureImpl.checkCallHandler(FutureImpl.java:135)
[vertx-core-3.2.0.jar:?]
at io.vertx.core.impl.FutureImpl.setHandler(FutureImpl.java:100)
[vertx-core-3.2.0.jar:?]
at io.vertx.core.impl.ContextImpl.lambda$null$14(ContextImpl.java:305)
[vertx-core-3.2.0.jar:?]
at io.vertx.core.impl.ContextImpl$$Lambda$34/2096797027.handle(Unknown
Source) [vertx-core-3.2.0.jar:?]
at io.vertx.core.impl.ContextImpl.lambda$wrapTask$16(ContextImpl.java:335)
[vertx-core-3.2.0.jar:?]
at io.vertx.core.impl.ContextImpl$$Lambda$13/688766789.run(Unknown Source)
[vertx-core-3.2.0.jar:?]
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
[netty-common-4.0.33.Final.jar:4.0.33.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
[netty-transport-4.0.33.Final.jar:4.0.33.Final]
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
[netty-common-4.0.33.Final.jar:4.0.33.Final]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
Caused by:
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException:
Failed to update keys (retry update if possible).:
[ef76d38e-63a9-4d49-b6ca-45b5262497eb:73fb36c5-0f7b-40cf-8ccd-9a167c55af72]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture$UpdateState.addFailedKeys(GridNearAtomicUpdateFuture.java:1241)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture$UpdateState.onResult(GridNearAtomicUpdateFuture.java:661)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.onResult(GridNearAtomicUpdateFuture.java:344)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.processNearAtomicUpdateResponse(GridDhtAtomicCache.java:2618)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$700(GridDhtAtomicCache.java:128)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$6.apply(GridDhtAtomicCache.java:263)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$6.apply(GridDhtAtomicCache.java:261)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:582)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:280)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:204)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:80)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:163)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:821)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.managers.communication.GridIoManager.access$1600(GridIoManager.java:103)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:784)
~[ignite-core-1.5.0.final.jar:1.5.0.final]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
~[?:1.8.0_40]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
~[?:1.8.0_40]
... 1 more


I don't find any clue!

Thank you for your help ! Val

2016-05-18 0:34 GMT+08:00 vkulichenko <va...@gmail.com>:

> Can you please show the full trace with the root cause?
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/IgniteCache-method-replace-key-newVal-behave-different-with-replace-key-oldVal-newVal-tp4986p4999.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: IgniteCache method replace(key,newVal) behave different with replace(key,oldVal,newVal)

Posted by vkulichenko <va...@gmail.com>.
Can you please show the full trace with the root cause?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteCache-method-replace-key-newVal-behave-different-with-replace-key-oldVal-newVal-tp4986p4999.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.