ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-9937) Primary response error info can be lost due to unwrapping a key
Date Thu, 25 Oct 2018 12:55:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-9937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663706#comment-16663706
] 

ASF GitHub Bot commented on IGNITE-9937:
----------------------------------------

GitHub user gromtech opened a pull request:

    https://github.com/apache/ignite/pull/5078

    IGNITE-9937 Primary response error can be lost due to unwrapping a key

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-9937

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/5078.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5078
    
----
commit e9d3827026bbd3f3c30c0a88f31a41528ecc200d
Author: Roman Guseinov <gromcase@...>
Date:   2018-10-25T12:52:52Z

    IGNITE-9937 Primary response error can be lost due to unwrapping a key

----


> Primary response error info can be lost due to unwrapping a key
> ---------------------------------------------------------------
>
>                 Key: IGNITE-9937
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9937
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.6
>            Reporter: Roman Guseinov
>            Assignee: Roman Guseinov
>            Priority: Major
>
> It can happen when we use SQL DDL to create a table or some dummy values for QueryEntity.keyType.
Without using Cache API (only SQL), key and value should not be deserialized/unwrapped.
> If primary update error happens onPrimaryError call may try to unwrap keys, get ClassNotFoundException
and hide the original error.
> Here is a stack trace example:
> {code:java}
> Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException: TestTableKey
>    at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:706)
>    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.CacheObjectUtils.unwrapBinary(CacheObjectUtils.java:177)
>    at org.apache.ignite.internal.processors.cache.CacheObjectUtils.unwrapBinaryIfNeeded(CacheObjectUtils.java:67)
>    at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:125)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.onPrimaryError(GridNearAtomicAbstractUpdateFuture.java:404)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.onPrimaryResponse(GridNearAtomicUpdateFuture.java:416)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture$1.apply(GridNearAtomicAbstractUpdateFuture.java:303)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture$1.apply(GridNearAtomicAbstractUpdateFuture.java:300)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicAbstractUpdateFuture.map(GridDhtAtomicAbstractUpdateFuture.java:390)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal0(GridDhtAtomicCache.java:1832)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAllAsyncInternal(GridDhtAtomicCache.java:1633)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.sendSingleRequest(GridNearAtomicAbstractUpdateFuture.java:299)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.map(GridNearAtomicUpdateFuture.java:812)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateFuture.mapOnTopology(GridNearAtomicUpdateFuture.java:664)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateFuture.map(GridNearAtomicAbstractUpdateFuture.java:248)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$25.apply(GridDhtAtomicCache.java:1067)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$25.apply(GridDhtAtomicCache.java:1065)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.asyncOp(GridDhtAtomicCache.java:761)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.updateAll0(GridDhtAtomicCache.java:1065)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putAllConflictAsync(GridDhtAtomicCache.java:687)
>    at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.putAllConflict(GridDhtAtomicCache.java:680)
>    at org.apache.ignite.internal.processors.dr.IgniteDrDataStreamerCacheUpdater.receive(IgniteDrDataStreamerCacheUpdater.java:97)
>    at org.apache.ignite.internal.processors.datastreamer.DataStreamerUpdateJob.call(DataStreamerUpdateJob.java:140)
>    at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6720)
>    at org.apache.ignite.internal.processors.closure.GridClosureProcessor$2.body(GridClosureProcessor.java:967)
>    ... 4 more
> Caused by: java.lang.ClassNotFoundException: TestTableKey
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>    at java.lang.Class.forName0(Native Method)
>    at java.lang.Class.forName(Class.java:348)
>    at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8633)
>    at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:349)
>    at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:697)
>    ... 32 more
> {code}
> The easiest solution - always use keepBinary = true while handling the primary error
(change of one code line is required).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message