ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Tupitsyn (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-7072) IgniteCache.replace(k, v, nv) does not work in binary mode without classes
Date Wed, 29 Nov 2017 14:38:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-7072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Tupitsyn updated IGNITE-7072:
-----------------------------------
    Description: 
{{IgniteCache.replace(K key, V oldVal, V newVal)}} method deserializes cache values in order
to compare them, which causes exception when classes are not present on server:

{code}
class org.apache.ignite.IgniteCheckedException: Unknown pair [platformId=0, typeId=-1690383137]
	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7260)
	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1242)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.onEntriesLocked(GridDhtTxPrepareFuture.java:464)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare0(GridDhtTxPrepareFuture.java:1223)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.mapIfLocked(GridDhtTxPrepareFuture.java:666)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare(GridDhtTxPrepareFuture.java:1040)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareAsyncLocal(GridNearTxLocal.java:3452)
	at org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareColocatedTx(IgniteTxHandler.java:257)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.proceedPrepare(GridNearOptimisticTxPrepareFuture.java:574)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepareSingle(GridNearOptimisticTxPrepareFuture.java:401)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepare0(GridNearOptimisticTxPrepareFuture.java:344)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepareOnTopology(GridNearOptimisticTxPrepareFutureAdapter.java:137)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepare(GridNearOptimisticTxPrepareFutureAdapter.java:74)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareNearTxLocal(GridNearTxLocal.java:3161)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.commitNearTxLocalAsync(GridNearTxLocal.java:3221)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.optimisticPutFuture(GridNearTxLocal.java:2391)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync0(GridNearTxLocal.java:622)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync(GridNearTxLocal.java:385)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$34.op(GridCacheAdapter.java:2707)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOp.op(GridCacheAdapter.java:5120)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4260)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture.execute(GridCacheAdapter.java:4841)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4173)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync0(GridCacheAdapter.java:2705)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync(GridCacheAdapter.java:2689)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.replaceAsync(GridCacheAdapter.java:2776)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.replaceAsync(IgniteCacheProxyImpl.java:1182)
	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.replaceAsync(GatewayProtectedCacheProxy.java:1082)
	at org.apache.ignite.internal.processors.platform.cache.PlatformCache.processInStreamOutLong(PlatformCache.java:677)
	at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutLong(PlatformTargetProxyImpl.java:67)
Caused by: java.lang.ClassNotFoundException: Unknown pair [platformId=0, typeId=-1690383137]
	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:378)
	at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:328)
	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:688)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1755)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1714)
	at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:797)
	at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:143)
	at org.apache.ignite.internal.processors.cache.GridCacheUtils.value(GridCacheUtils.java:1298)
	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:64)
	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:32)
	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1237)
{code}

To reproduce:
* Create key and value with {{BinaryObjectBuilder}} so that there are no Java classes for
specified type name
* Call {{cache.withKeepBinary().replace(k, v, nv)}}

  was:
{{IgniteCache.replace(K key, V oldVal, V newVal)}} method deserializes cache values in order
to compare them, which causes exception when classes are not present on server:

{code}
class org.apache.ignite.IgniteCheckedException: Unknown pair [platformId=0, typeId=-1690383137]
	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7260)
	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1242)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.onEntriesLocked(GridDhtTxPrepareFuture.java:464)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare0(GridDhtTxPrepareFuture.java:1223)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.mapIfLocked(GridDhtTxPrepareFuture.java:666)
	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare(GridDhtTxPrepareFuture.java:1040)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareAsyncLocal(GridNearTxLocal.java:3452)
	at org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareColocatedTx(IgniteTxHandler.java:257)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.proceedPrepare(GridNearOptimisticTxPrepareFuture.java:574)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepareSingle(GridNearOptimisticTxPrepareFuture.java:401)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepare0(GridNearOptimisticTxPrepareFuture.java:344)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepareOnTopology(GridNearOptimisticTxPrepareFutureAdapter.java:137)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepare(GridNearOptimisticTxPrepareFutureAdapter.java:74)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareNearTxLocal(GridNearTxLocal.java:3161)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.commitNearTxLocalAsync(GridNearTxLocal.java:3221)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.optimisticPutFuture(GridNearTxLocal.java:2391)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync0(GridNearTxLocal.java:622)
	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync(GridNearTxLocal.java:385)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$34.op(GridCacheAdapter.java:2707)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOp.op(GridCacheAdapter.java:5120)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4260)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture.execute(GridCacheAdapter.java:4841)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4173)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync0(GridCacheAdapter.java:2705)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync(GridCacheAdapter.java:2689)
	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.replaceAsync(GridCacheAdapter.java:2776)
	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.replaceAsync(IgniteCacheProxyImpl.java:1182)
	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.replaceAsync(GatewayProtectedCacheProxy.java:1082)
	at org.apache.ignite.internal.processors.platform.cache.PlatformCache.processInStreamOutLong(PlatformCache.java:677)
	at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutLong(PlatformTargetProxyImpl.java:67)
Caused by: java.lang.ClassNotFoundException: Unknown pair [platformId=0, typeId=-1690383137]
	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:378)
	at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:328)
	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:688)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1755)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1714)
	at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:797)
	at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:143)
	at org.apache.ignite.internal.processors.cache.GridCacheUtils.value(GridCacheUtils.java:1298)
	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:64)
	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:32)
	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1237)
{code}


> IgniteCache.replace(k, v, nv) does not work in binary mode without classes
> --------------------------------------------------------------------------
>
>                 Key: IGNITE-7072
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7072
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>            Reporter: Pavel Tupitsyn
>             Fix For: 2.4
>
>
> {{IgniteCache.replace(K key, V oldVal, V newVal)}} method deserializes cache values in
order to compare them, which causes exception when classes are not present on server:
> {code}
> class org.apache.ignite.IgniteCheckedException: Unknown pair [platformId=0, typeId=-1690383137]
> 	at org.apache.ignite.internal.util.IgniteUtils.cast(IgniteUtils.java:7260)
> 	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1242)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.onEntriesLocked(GridDhtTxPrepareFuture.java:464)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare0(GridDhtTxPrepareFuture.java:1223)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.mapIfLocked(GridDhtTxPrepareFuture.java:666)
> 	at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtTxPrepareFuture.prepare(GridDhtTxPrepareFuture.java:1040)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareAsyncLocal(GridNearTxLocal.java:3452)
> 	at org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.prepareColocatedTx(IgniteTxHandler.java:257)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.proceedPrepare(GridNearOptimisticTxPrepareFuture.java:574)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepareSingle(GridNearOptimisticTxPrepareFuture.java:401)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.prepare0(GridNearOptimisticTxPrepareFuture.java:344)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepareOnTopology(GridNearOptimisticTxPrepareFutureAdapter.java:137)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFutureAdapter.prepare(GridNearOptimisticTxPrepareFutureAdapter.java:74)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.prepareNearTxLocal(GridNearTxLocal.java:3161)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.commitNearTxLocalAsync(GridNearTxLocal.java:3221)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.optimisticPutFuture(GridNearTxLocal.java:2391)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync0(GridNearTxLocal.java:622)
> 	at org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.putAsync(GridNearTxLocal.java:385)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$34.op(GridCacheAdapter.java:2707)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOp.op(GridCacheAdapter.java:5120)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4260)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter$AsyncOpRetryFuture.execute(GridCacheAdapter.java:4841)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.asyncOp(GridCacheAdapter.java:4173)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync0(GridCacheAdapter.java:2705)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.putAsync(GridCacheAdapter.java:2689)
> 	at org.apache.ignite.internal.processors.cache.GridCacheAdapter.replaceAsync(GridCacheAdapter.java:2776)
> 	at org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.replaceAsync(IgniteCacheProxyImpl.java:1182)
> 	at org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.replaceAsync(GatewayProtectedCacheProxy.java:1082)
> 	at org.apache.ignite.internal.processors.platform.cache.PlatformCache.processInStreamOutLong(PlatformCache.java:677)
> 	at org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutLong(PlatformTargetProxyImpl.java:67)
> Caused by: java.lang.ClassNotFoundException: Unknown pair [platformId=0, typeId=-1690383137]
> 	at org.apache.ignite.internal.MarshallerContextImpl.getClassName(MarshallerContextImpl.java:378)
> 	at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:328)
> 	at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:688)
> 	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize0(BinaryReaderExImpl.java:1755)
> 	at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1714)
> 	at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:797)
> 	at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:143)
> 	at org.apache.ignite.internal.processors.cache.GridCacheUtils.value(GridCacheUtils.java:1298)
> 	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:64)
> 	at org.apache.ignite.internal.processors.cache.CacheEntryPredicateContainsValue.apply(CacheEntryPredicateContainsValue.java:32)
> 	at org.apache.ignite.internal.processors.cache.GridCacheContext.isAll(GridCacheContext.java:1237)
> {code}
> To reproduce:
> * Create key and value with {{BinaryObjectBuilder}} so that there are no Java classes
for specified type name
> * Call {{cache.withKeepBinary().replace(k, v, nv)}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message