You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/10 11:28:00 UTC

[jira] [Commented] (IGNITE-9133) MVCC: Proper empty DHT transactions handling.

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

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

GitHub user devozerov opened a pull request:

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

    IGNITE-9133

    

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

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

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

    https://github.com/apache/ignite/pull/4943.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 #4943
    
----
commit e7e76fd91268a44539f0ae7adf9ea58caaac1b0d
Author: devozerov <vo...@...>
Date:   2018-10-10T10:30:29Z

    Test.

commit 233b2501c931b71f3551ace963b926651af47a6f
Author: devozerov <vo...@...>
Date:   2018-10-10T10:36:37Z

    WIP.

commit 1539e79319ba3fd091fa7e0e4b7601af671976ec
Author: devozerov <vo...@...>
Date:   2018-10-10T10:37:00Z

    WIP.

commit ffb2e4fb617d5af4c1f88542e79dad1f884f95f4
Author: devozerov <vo...@...>
Date:   2018-10-10T11:26:34Z

    Done.

----


> MVCC: Proper empty DHT transactions handling.
> ---------------------------------------------
>
>                 Key: IGNITE-9133
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9133
>             Project: Ignite
>          Issue Type: Bug
>          Components: mvcc, sql
>            Reporter: Roman Kondakov
>            Assignee: Vladimir Ozerov
>            Priority: Major
>             Fix For: 2.7
>
>
> In the cases when DHT transaction is empty (i.e. no keys were enlisted) after the enlist step, we need to rollback local DHT transaction to exclude it from the further transaction flow in order to performance increasing.
> An ordinary Dht tx rollback {{GridDhtTxLocal#rollbackDhtLocalAsync}} is not suitable in this situation because it adds tx to {{IgniteTxManager#completedVersHashMap}} which is unacceptable because this action prevents possible Dht transaction creation if the next tx statements enlist some keys at this node in the future. As well as direct tx map cleaning by means of {{IgniteTxManager#rollbackTx(tx, true, true)}} is not an aid because leads to grid hanging due to undiscovered reasons.  In order to reproduce hanging you need to reapply commit d231a81 and run {{CacheMvccPartitionedSqlCoordinatorFailoverTest}}. Example of hanged thread stack is listed below.
> Our goal is the proper Dht transaction rollback without adding it to {{IgniteTxManager#completedVersHashMap.}}
> {code:java}
> Thread [name="writer-2", id=2281, state=WAITING, blockCnt=40, waitCnt=10260]
>         at sun.misc.Unsafe.park(Native Method)
>         at java.util.concurrent.locks.LockSupport.park(LockSupport.java:304)
>         at o.a.i.i.util.future.GridFutureAdapter.get0(GridFutureAdapter.java:177)
>         at o.a.i.i.util.future.GridFutureAdapter.get(GridFutureAdapter.java:140)
>         at o.a.i.i.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:560)
>         at o.a.i.i.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:185)
>         at o.a.i.i.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:358)
>         at o.a.i.i.processors.query.h2.IgniteH2Indexing.doRunPrepared(IgniteH2Indexing.java:2132)
>         at o.a.i.i.processors.query.h2.IgniteH2Indexing.querySqlFields(IgniteH2Indexing.java:2083)
>         at o.a.i.i.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2139)
>         at o.a.i.i.processors.query.GridQueryProcessor$4.applyx(GridQueryProcessor.java:2134)
>         at o.a.i.i.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
>         at o.a.i.i.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2682)
>         at o.a.i.i.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:2148)
>         at o.a.i.i.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:668)
>         at o.a.i.i.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:619)
>         at o.a.i.i.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:388)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest.removeSql(CacheMvccAbstractTest.java:832)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest.access$400(CacheMvccAbstractTest.java:104)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest$2.apply(CacheMvccAbstractTest.java:494)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest$2.apply(CacheMvccAbstractTest.java:401)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest$9.call(CacheMvccAbstractTest.java:1294)
>         at o.a.i.i.processors.cache.mvcc.CacheMvccAbstractTest$9.call(CacheMvccAbstractTest.java:1289)
>         at o.a.i.testframework.GridTestThread.run(GridTestThread.java:86)
> {code}
>  



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