ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Goncharuk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2623) [Failed test] ClientTcpMultiThreadedSelfTest.testMultithreadedTaskRun
Date Thu, 11 Feb 2016 13:06:18 GMT

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

Alexey Goncharuk commented on IGNITE-2623:
------------------------------------------

It appears that putIfAbsent may exit prematurely in FULL_SYNC mode when backups are not updated
yet. This happens because response is sent to the originating node immediately after filter
evaluation failed - backups may be not updated at this moment. 

Proposed fix:
If filter evaluation fails, we need to iterate over all existing MVCC futures and for each
future check 
 * if that future updates the given key?
 * if the future version is less or equals than the current entry version

If one or more such futures found, we need to wait for their completion asynchronously and
only then send an update response.
In order for this fix to work, we need to make sure that DhtAtomicUpdateFuture is created
before entry update is attempted.

> [Failed test] ClientTcpMultiThreadedSelfTest.testMultithreadedTaskRun
> ---------------------------------------------------------------------
>
>                 Key: IGNITE-2623
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2623
>             Project: Ignite
>          Issue Type: Test
>    Affects Versions: 1.5.0.final
>            Reporter: Andrey Gura
>            Assignee: Andrey Gura
>
> {{ClientTcpMultiThreadedSelfTest.testMultithreadedTaskRun}} test fails periodically.
> {noformat}
> java.lang.Exception: class org.apache.ignite.internal.client.GridClientException: Failed
to deserialize object with given class loader: IsolatedClassLoader{roleName='test'}
>     at org.apache.ignite.internal.client.ClientAbstractMultiThreadedSelfTest.testMultithreadedTaskRun(ClientAbstractMultiThreadedSelfTest.java:279)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:606)
>     at junit.framework.TestCase.runTest(TestCase.java:176)
>     at org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:1723)
>     at org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:118)
>     at org.apache.ignite.testframework.junits.GridAbstractTest$4.run(GridAbstractTest.java:1661)
>     at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.ignite.internal.client.GridClientException: Failed to deserialize
object with given class loader: IsolatedClassLoader{roleName='test'}
>     at org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection.handleClientResponse(GridClientNioTcpConnection.java:612)
>     at org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection.handleResponse(GridClientNioTcpConnection.java:547)
>     at org.apache.ignite.internal.client.impl.connection.GridClientConnectionManagerAdapter$NioListener.onMessage(GridClientConnectionManagerAdapter.java:628)
>     at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:270)
>     at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
>     at org.apache.ignite.internal.util.nio.GridNioCodecFilter.onMessageReceived(GridNioCodecFilter.java:107)
>     at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:107)
>     at org.apache.ignite.internal.util.nio.GridNioServer$HeadFilter.onMessageReceived(GridNioServer.java:2246)
>     at org.apache.ignite.internal.util.nio.GridNioFilterChain.onMessageReceived(GridNioFilterChain.java:173)
>     at org.apache.ignite.internal.util.nio.GridNioServer$ByteBufferNioClientWorker.processRead(GridNioServer.java:759)
>     at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.processSelectedKeysOptimized(GridNioServer.java:1512)
>     at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:1445)
>     at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1280)
>     at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
>     at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Possible problem:
> * N threads are trying to execute task.
> * The first thread is trying to put registered class into marshaller cache (see {{MarshallerContextImpl.registerClassName}}).
Performs put locally and waiting for responses from backups.
> * The second thread get registered class locally (first thread already updated cache)
and send task to remote node.
> * Remote node (it is backup node) trying to deserialize task and get class descriptor
by {{typeId}}. But update from the first thread still is not finished on this node. Task execution
fails because can't deserialize task.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message