Roman Kondakov created IGNITE-9133:
--------------------------------------
Summary: SQL TX: Proper empty DHT transactions handling.
Key: IGNITE-9133
URL: https://issues.apache.org/jira/browse/IGNITE-9133
Project: Ignite
Issue Type: Bug
Reporter: Roman Kondakov
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)