You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/04/18 08:00:48 UTC

[1/8] ignite git commit: IGNITE-2766 Fix .net test. - Fixes #3853.

Repository: ignite
Updated Branches:
  refs/heads/ignite-7708 dd18bb328 -> 35e110747


IGNITE-2766 Fix .net test. - Fixes #3853.

Signed-off-by: dpavlov <dp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96cb795f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96cb795f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96cb795f

Branch: refs/heads/ignite-7708
Commit: 96cb795f3d97af0e3dcb95fa0c81e31257d83431
Parents: 7b39f13
Author: Ilya Kasnacheev <il...@gmail.com>
Authored: Tue Apr 17 19:50:51 2018 +0300
Committer: dpavlov <dp...@apache.org>
Committed: Tue Apr 17 19:50:51 2018 +0300

----------------------------------------------------------------------
 .../platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96cb795f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
index 7e6222f..274439e 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/ReconnectTest.cs
@@ -98,10 +98,8 @@ namespace Apache.Ignite.Core.Tests
             cache1[1] = 2;
             Assert.AreEqual(2, cache1[1]);
 
-            // Check that old cache instance does not work.
-            var cacheEx1 = Assert.Throws<InvalidOperationException>(() => cache.Get(1));
-            Assert.IsTrue(cacheEx1.Message.EndsWith("Failed to perform cache operation (cache is stopped): cache"), 
-                cacheEx1.Message);
+            // Check that old cache instance still works.
+            Assert.AreEqual(2, cache.Get(1));
         }
 
         /// <summary>


[4/8] ignite git commit: IGNITE-8301 testReconnectCacheDestroyedAndCreated should excpect recreated client cache - Fixes #3856.

Posted by ag...@apache.org.
IGNITE-8301 testReconnectCacheDestroyedAndCreated should excpect recreated client cache - Fixes #3856.

Signed-off-by: dpavlov <dp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/56be24b9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/56be24b9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/56be24b9

Branch: refs/heads/ignite-7708
Commit: 56be24b9dfc14023bacaab63f40e0504b317eda3
Parents: c3ff274
Author: Maxim Muzafarov <ma...@gmail.com>
Authored: Tue Apr 17 21:18:36 2018 +0300
Committer: dpavlov <dp...@apache.org>
Committed: Tue Apr 17 21:18:36 2018 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteClientReconnectCacheTest.java | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/56be24b9/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
index 3cb82e0..ec5eab2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/IgniteClientReconnectCacheTest.java
@@ -894,12 +894,6 @@ public class IgniteClientReconnectCacheTest extends IgniteClientReconnectAbstrac
             }
         });
 
-        GridTestUtils.assertThrows(log, new Callable<Object>() {
-            @Override public Object call() throws Exception {
-                return clientCache.get(1);
-            }
-        }, IllegalStateException.class, null);
-
         checkCacheDiscoveryData(srv, client, DEFAULT_CACHE_NAME, true, false, false);
 
         IgniteCache<Object, Object> clientCache0 = client.cache(DEFAULT_CACHE_NAME);


[6/8] ignite git commit: IGNITE-8294 Web Console: Move "Beta" ribbon to the left.

Posted by ag...@apache.org.
IGNITE-8294 Web Console: Move "Beta" ribbon to the left.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/69606e42
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/69606e42
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/69606e42

Branch: refs/heads/ignite-7708
Commit: 69606e4248a69d44f798c9f59865281c19744a69
Parents: eda5fe7
Author: Ilya Borisov <kl...@gmail.com>
Authored: Wed Apr 18 11:39:41 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Apr 18 11:39:41 2018 +0700

----------------------------------------------------------------------
 .../web-console/frontend/public/stylesheets/style.scss    | 10 ++++++++++
 modules/web-console/frontend/views/index.pug              |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/69606e42/modules/web-console/frontend/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/public/stylesheets/style.scss b/modules/web-console/frontend/public/stylesheets/style.scss
index ae1e58c..0c978e9 100644
--- a/modules/web-console/frontend/public/stylesheets/style.scss
+++ b/modules/web-console/frontend/public/stylesheets/style.scss
@@ -1938,6 +1938,16 @@ treecontrol.tree-classic {
     }
 }
 
+.ribbon-wrapper.left {
+    overflow: visible;
+
+    .ribbon {
+        transform: rotate(-45deg);
+        left: -75px;
+        top: 10px;
+    }
+}
+
 html, body {
     width: 100%;
     min-height: 100vh;

http://git-wip-us.apache.org/repos/asf/ignite/blob/69606e42/modules/web-console/frontend/views/index.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/index.pug b/modules/web-console/frontend/views/index.pug
index e91af9b..6384592 100644
--- a/modules/web-console/frontend/views/index.pug
+++ b/modules/web-console/frontend/views/index.pug
@@ -39,7 +39,7 @@ html(ng-app='ignite-console' id='app' ng-strict-di)
 
                 .splash-wellcome Loading...
 
-        .ribbon-wrapper.right(ng-if='!IgniteDemoMode')
+        .ribbon-wrapper.left(ng-if='!IgniteDemoMode')
             .ribbon
                 label Beta
 


[8/8] ignite git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-7708

Posted by ag...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-7708


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/35e11074
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/35e11074
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/35e11074

Branch: refs/heads/ignite-7708
Commit: 35e110747b0651b977eb2fd609a4281381aa0046
Parents: dd18bb3 ced5d27
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Apr 18 11:00:36 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Apr 18 11:00:36 2018 +0300

----------------------------------------------------------------------
 .../JettyRestProcessorAbstractSelfTest.java     |   8 +-
 .../processors/cache/GridCacheAdapter.java      |   3 +-
 ...arOptimisticSerializableTxPrepareFuture.java |   2 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |   2 +-
 .../GridNearPessimisticTxPrepareFuture.java     |   2 +-
 .../near/GridNearTxFastFinishFuture.java        |  10 +-
 .../cache/distributed/near/GridNearTxLocal.java |  57 ++++++----
 .../cache/transactions/IgniteTxManager.java     |   5 +-
 .../IgniteClientReconnectCacheTest.java         |   6 --
 .../transactions/TxRollbackOnTimeoutTest.java   |   2 +
 .../Apache.Ignite.Core.Tests/ReconnectTest.cs   |   6 +-
 modules/sqlline/bin/sqlline.sh                  |   7 +-
 .../generator/ConfigurationGenerator.js         | 106 +++++++++----------
 .../frontend/public/stylesheets/style.scss      |  10 ++
 modules/web-console/frontend/views/index.pug    |   2 +-
 15 files changed, 132 insertions(+), 96 deletions(-)
----------------------------------------------------------------------



[5/8] ignite git commit: IGNITE-8140 Web Console: Fixed code generation for large numbers in configuration params.

Posted by ag...@apache.org.
IGNITE-8140 Web Console: Fixed code generation for large numbers in configuration params.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/eda5fe73
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/eda5fe73
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/eda5fe73

Branch: refs/heads/ignite-7708
Commit: eda5fe736df920cad305540b500dcaf1a772f2d8
Parents: 56be24b
Author: Vasiliy Sisko <vs...@gridgain.com>
Authored: Wed Apr 18 10:44:44 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Apr 18 10:44:44 2018 +0700

----------------------------------------------------------------------
 .../generator/ConfigurationGenerator.js         | 106 +++++++++----------
 1 file changed, 53 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/eda5fe73/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
index 45d9ad1..c5f82d3 100644
--- a/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
+++ b/modules/web-console/frontend/app/modules/configuration/generator/ConfigurationGenerator.js
@@ -720,8 +720,8 @@ export default class IgniteConfigurationGenerator {
                         .intProperty('connectionTimeout')
                         .intProperty('requestTimeout')
                         .stringProperty('signerOverride')
-                        .intProperty('connectionTTL')
-                        .intProperty('connectionMaxIdleMillis')
+                        .longProperty('connectionTTL')
+                        .longProperty('connectionMaxIdleMillis')
                         .emptyBeanProperty('dnsResolver')
                         .intProperty('responseMetadataCacheSize')
                         .emptyBeanProperty('secureRandom')
@@ -790,7 +790,7 @@ export default class IgniteConfigurationGenerator {
         if (!available('2.3.0'))
             return cfg;
 
-        cfg.intProperty('longQueryWarningTimeout');
+        cfg.longProperty('longQueryWarningTimeout');
 
         if (_.get(cluster, 'clientConnectorConfiguration.enabled') !== true)
             return cfg;
@@ -837,7 +837,7 @@ export default class IgniteConfigurationGenerator {
 
                 colSpi.intProperty('activeJobsThreshold')
                     .intProperty('waitJobsThreshold')
-                    .intProperty('messageExpireTime')
+                    .longProperty('messageExpireTime')
                     .intProperty('maximumStealingAttempts')
                     .boolProperty('stealingEnabled')
                     .emptyBeanProperty('externalCollisionListener')
@@ -892,9 +892,9 @@ export default class IgniteConfigurationGenerator {
             .intProperty('sharedMemoryPort')
             .intProperty('directBuffer')
             .intProperty('directSendBuffer')
-            .intProperty('idleConnectionTimeout')
-            .intProperty('connectTimeout')
-            .intProperty('maxConnectTimeout')
+            .longProperty('idleConnectionTimeout')
+            .longProperty('connectTimeout')
+            .longProperty('maxConnectTimeout')
             .intProperty('reconnectCount')
             .intProperty('socketSendBuffer')
             .intProperty('socketReceiveBuffer')
@@ -903,19 +903,19 @@ export default class IgniteConfigurationGenerator {
             .intProperty('tcpNoDelay')
             .intProperty('ackSendThreshold')
             .intProperty('unacknowledgedMessagesBufferSize')
-            .intProperty('socketWriteTimeout')
+            .longProperty('socketWriteTimeout')
             .intProperty('selectorsCount')
             .emptyBeanProperty('addressResolver');
 
         if (commSpi.nonEmpty())
             cfg.beanProperty('communicationSpi', commSpi);
 
-        cfg.intProperty('networkTimeout')
-            .intProperty('networkSendRetryDelay')
+        cfg.longProperty('networkTimeout')
+            .longProperty('networkSendRetryDelay')
             .intProperty('networkSendRetryCount');
 
         if (available(['1.0.0', '2.3.0']))
-            cfg.intProperty('discoveryStartupDelay');
+            cfg.longProperty('discoveryStartupDelay');
 
         return cfg;
     }
@@ -930,9 +930,9 @@ export default class IgniteConfigurationGenerator {
                 .stringProperty('host')
                 .intProperty('port')
                 .intProperty('portRange')
-                .intProperty('idleTimeout')
-                .intProperty('idleQueryCursorTimeout')
-                .intProperty('idleQueryCursorCheckFrequency')
+                .longProperty('idleTimeout')
+                .longProperty('idleQueryCursorTimeout')
+                .longProperty('idleQueryCursorCheckFrequency')
                 .intProperty('receiveBufferSize')
                 .intProperty('sendBufferSize')
                 .intProperty('sendQueueLimit')
@@ -1020,11 +1020,11 @@ export default class IgniteConfigurationGenerator {
             .intProperty('localPort')
             .intProperty('localPortRange')
             .emptyBeanProperty('addressResolver')
-            .intProperty('socketTimeout')
-            .intProperty('ackTimeout')
-            .intProperty('maxAckTimeout')
-            .intProperty('networkTimeout')
-            .intProperty('joinTimeout')
+            .longProperty('socketTimeout')
+            .longProperty('ackTimeout')
+            .longProperty('maxAckTimeout')
+            .longProperty('networkTimeout')
+            .longProperty('joinTimeout')
             .intProperty('threadPriority');
 
         // Removed in ignite 2.0
@@ -1034,13 +1034,13 @@ export default class IgniteConfigurationGenerator {
                 .intProperty('maxMissedClientHeartbeats');
         }
 
-        discoSpi.intProperty('topHistorySize')
+        discoSpi.longProperty('topHistorySize')
             .emptyBeanProperty('listener')
             .emptyBeanProperty('dataExchange')
             .emptyBeanProperty('metricsProvider')
             .intProperty('reconnectCount')
-            .intProperty('statisticsPrintFrequency')
-            .intProperty('ipFinderCleanFrequency')
+            .longProperty('statisticsPrintFrequency')
+            .longProperty('ipFinderCleanFrequency')
             .emptyBeanProperty('authenticator')
             .intProperty('forceServerMode')
             .intProperty('clientReconnectDisabled');
@@ -1090,8 +1090,8 @@ export default class IgniteConfigurationGenerator {
             case 'Memory':
                 eventStorageBean = new Bean('org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi', 'eventStorage', eventStorage.Memory, clusterDflts.eventStorage.Memory);
 
-                eventStorageBean.intProperty('expireAgeMs')
-                    .intProperty('expireCount')
+                eventStorageBean.longProperty('expireAgeMs')
+                    .longProperty('expireCount')
                     .emptyBeanProperty('filter');
 
                 break;
@@ -1128,8 +1128,8 @@ export default class IgniteConfigurationGenerator {
 
         // Since ignite 2.0
         if (available('2.0.0')) {
-            cfg.intProperty('failureDetectionTimeout')
-                .intProperty('clientFailureDetectionTimeout');
+            cfg.longProperty('failureDetectionTimeout')
+                .longProperty('clientFailureDetectionTimeout');
         }
 
         _.forEach(cluster.failoverSpi, (spi) => {
@@ -1210,7 +1210,7 @@ export default class IgniteConfigurationGenerator {
         if (plannerBean)
             hadoopBean.beanProperty('mapReducePlanner', plannerBean);
 
-        hadoopBean.intProperty('finishedJobInfoTtl')
+        hadoopBean.longProperty('finishedJobInfoTtl')
             .intProperty('maxParallelTasks')
             .intProperty('maxTaskQueueSize')
             .arrayProperty('nativeLibraryNames', 'nativeLibraryNames', _.get(hadoop, 'nativeLibraryNames'));
@@ -1368,12 +1368,12 @@ export default class IgniteConfigurationGenerator {
 
         memoryBean.intProperty('pageSize')
             .intProperty('concurrencyLevel')
-            .intProperty('systemCacheInitialSize')
-            .intProperty('systemCacheMaxSize')
+            .longProperty('systemCacheInitialSize')
+            .longProperty('systemCacheMaxSize')
             .stringProperty('defaultMemoryPolicyName');
 
         if (memoryBean.valueOf('defaultMemoryPolicyName') === 'default')
-            memoryBean.intProperty('defaultMemoryPolicySize');
+            memoryBean.longProperty('defaultMemoryPolicySize');
 
         const policies = [];
 
@@ -1438,8 +1438,8 @@ export default class IgniteConfigurationGenerator {
 
         storageBean.intProperty('pageSize')
             .intProperty('concurrencyLevel')
-            .intProperty('systemRegionInitialSize')
-            .intProperty('systemRegionMaxSize');
+            .longProperty('systemRegionInitialSize')
+            .longProperty('systemRegionMaxSize');
 
         const dfltDataRegionCfg = this.dataRegionConfiguration(_.get(dataStorageCfg, 'defaultDataRegionConfiguration'));
 
@@ -1461,7 +1461,7 @@ export default class IgniteConfigurationGenerator {
             storageBean.varArgProperty('dataRegionConfigurations', 'dataRegionConfigurations', dataRegionCfgs, 'org.apache.ignite.configuration.DataRegionConfiguration');
 
         storageBean.stringProperty('storagePath')
-            .intProperty('checkpointFrequency')
+            .longProperty('checkpointFrequency')
             .intProperty('checkpointThreads')
             .enumProperty('checkpointWriteOrder')
             .enumProperty('walMode')
@@ -1480,7 +1480,7 @@ export default class IgniteConfigurationGenerator {
             .longProperty('lockWaitTime')
             .intProperty('walThreadLocalBufferSize')
             .intProperty('metricsSubIntervalCount')
-            .intProperty('metricsRateTimeInterval')
+            .longProperty('metricsRateTimeInterval')
             .longProperty('walAutoArchiveAfterInactivity')
             .boolProperty('metricsEnabled')
             .boolProperty('alwaysWriteFullPages')
@@ -1594,13 +1594,13 @@ export default class IgniteConfigurationGenerator {
 
     // Generate metrics group.
     static clusterMetrics(cluster, available, cfg = this.igniteConfigurationBean(cluster)) {
-        cfg.intProperty('metricsExpireTime')
+        cfg.longProperty('metricsExpireTime')
             .intProperty('metricsHistorySize')
-            .intProperty('metricsLogFrequency');
+            .longProperty('metricsLogFrequency');
 
         // Since ignite 2.0
         if (available('2.0.0'))
-            cfg.intProperty('metricsUpdateFrequency');
+            cfg.longProperty('metricsUpdateFrequency');
 
         return cfg;
     }
@@ -1630,7 +1630,7 @@ export default class IgniteConfigurationGenerator {
         if (!available('2.1.0'))
             return cfg;
 
-        cfg.intProperty('longQueryWarningTimeout');
+        cfg.longProperty('longQueryWarningTimeout');
 
         if (_.get(cluster, 'sqlConnectorConfiguration.enabled') !== true)
             return cfg;
@@ -1663,7 +1663,7 @@ export default class IgniteConfigurationGenerator {
         bean.stringProperty('persistentStorePath')
             .boolProperty('metricsEnabled')
             .boolProperty('alwaysWriteFullPages')
-            .intProperty('checkpointingFrequency')
+            .longProperty('checkpointingFrequency')
             .longProperty('checkpointingPageBufferSize')
             .intProperty('checkpointingThreads')
             .stringProperty('walStorePath')
@@ -1675,7 +1675,7 @@ export default class IgniteConfigurationGenerator {
             .longProperty('walFsyncDelayNanos')
             .intProperty('walRecordIteratorBufferSize')
             .longProperty('lockWaitTime')
-            .intProperty('rateTimeInterval')
+            .longProperty('rateTimeInterval')
             .intProperty('tlbSize')
             .intProperty('subIntervals');
 
@@ -1782,7 +1782,7 @@ export default class IgniteConfigurationGenerator {
             .intProperty('igfsThreadPoolSize')
             .intProperty('rebalanceThreadPoolSize')
             .intProperty('utilityCacheThreadPoolSize', 'utilityCachePoolSize')
-            .intProperty('utilityCacheKeepAliveTime')
+            .longProperty('utilityCacheKeepAliveTime')
             .intProperty('asyncCallbackPoolSize')
             .intProperty('stripedPoolSize');
 
@@ -1817,7 +1817,7 @@ export default class IgniteConfigurationGenerator {
 
         bean.enumProperty('defaultTxConcurrency')
             .enumProperty('defaultTxIsolation')
-            .intProperty('defaultTxTimeout')
+            .longProperty('defaultTxTimeout')
             .intProperty('pessimisticTxLogLinger')
             .intProperty('pessimisticTxLogSize')
             .boolProperty('txSerializableEnabled')
@@ -2070,7 +2070,7 @@ export default class IgniteConfigurationGenerator {
             ccfg.enumProperty('memoryMode');
 
             if (ccfg.valueOf('memoryMode') !== 'OFFHEAP_VALUES')
-                ccfg.intProperty('offHeapMaxMemory');
+                ccfg.longProperty('offHeapMaxMemory');
         }
 
         // Since ignite 2.0
@@ -2105,7 +2105,7 @@ export default class IgniteConfigurationGenerator {
         if (available(['1.0.0', '2.0.0']))
             ccfg.intProperty('sqlOnheapRowCacheSize');
 
-        ccfg.intProperty('longQueryWarningTimeout')
+        ccfg.longProperty('longQueryWarningTimeout')
             .arrayProperty('indexedTypes', 'indexedTypes', indexedTypes, 'java.lang.Class')
             .intProperty('queryDetailMetricsSize')
             .arrayProperty('sqlFunctionClasses', 'sqlFunctionClasses', cache.sqlFunctionClasses, 'java.lang.Class');
@@ -2225,7 +2225,7 @@ export default class IgniteConfigurationGenerator {
             ccfg.boolProperty('writeBehindEnabled')
                 .intProperty('writeBehindBatchSize')
                 .intProperty('writeBehindFlushSize')
-                .intProperty('writeBehindFlushFrequency')
+                .longProperty('writeBehindFlushFrequency')
                 .intProperty('writeBehindFlushThreadCount');
 
             // Since ignite 2.0
@@ -2239,7 +2239,7 @@ export default class IgniteConfigurationGenerator {
     // Generate cache concurrency control group.
     static cacheConcurrency(cache, available, ccfg = this.cacheConfigurationBean(cache)) {
         ccfg.intProperty('maxConcurrentAsyncOperations')
-            .intProperty('defaultLockTimeout');
+            .longProperty('defaultLockTimeout');
 
         // Removed in ignite 2.0
         if (available(['1.0.0', '2.0.0']))
@@ -2297,11 +2297,11 @@ export default class IgniteConfigurationGenerator {
             ccfg.enumProperty('rebalanceMode')
                 .intProperty('rebalanceThreadPoolSize')
                 .intProperty('rebalanceBatchSize')
-                .intProperty('rebalanceBatchesPrefetchCount')
+                .longProperty('rebalanceBatchesPrefetchCount')
                 .intProperty('rebalanceOrder')
-                .intProperty('rebalanceDelay')
-                .intProperty('rebalanceTimeout')
-                .intProperty('rebalanceThrottle');
+                .longProperty('rebalanceDelay')
+                .longProperty('rebalanceTimeout')
+                .longProperty('rebalanceThrottle');
         }
 
         if (ccfg.includes('igfsAffinnityGroupSize')) {
@@ -2456,8 +2456,8 @@ export default class IgniteConfigurationGenerator {
     static igfsFragmentizer(igfs, cfg = this.igfsConfigurationBean(igfs)) {
         if (igfs.fragmentizerEnabled) {
             cfg.intProperty('fragmentizerConcurrentFiles')
-                .intProperty('fragmentizerThrottlingBlockLength')
-                .intProperty('fragmentizerThrottlingDelay');
+                .longProperty('fragmentizerThrottlingBlockLength')
+                .longProperty('fragmentizerThrottlingDelay');
         }
         else
             cfg.boolProperty('fragmentizerEnabled');
@@ -2490,7 +2490,7 @@ export default class IgniteConfigurationGenerator {
         if (available(['1.0.0', '2.0.0']))
             cfg.intProperty('maxSpaceSize');
 
-        cfg.intProperty('maximumTaskRangeLength')
+        cfg.longProperty('maximumTaskRangeLength')
             .intProperty('managementPort')
             .intProperty('perNodeBatchSize')
             .intProperty('perNodeParallelBatchCount')


[7/8] ignite git commit: IGNITE-8201 Fixed NPE

Posted by ag...@apache.org.
IGNITE-8201 Fixed NPE


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ced5d276
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ced5d276
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ced5d276

Branch: refs/heads/ignite-7708
Commit: ced5d2768d47504533064000c8ce525d80613ca3
Parents: 69606e4
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Apr 18 10:59:46 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Apr 18 11:00:15 2018 +0300

----------------------------------------------------------------------
 .../processors/rest/JettyRestProcessorAbstractSelfTest.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ced5d276/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index e36447b..0285f3a 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -985,9 +985,11 @@ public abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestPro
         if (dsCfg.getDefaultDataRegionConfiguration().isPersistenceEnabled())
             fail("IGNITE-5874");
 
-        for (DataRegionConfiguration dataRegCfg : dsCfg.getDataRegionConfigurations()) {
-            if (dataRegCfg.isPersistenceEnabled())
-                fail("IGNITE-5874");
+        if (!F.isEmpty(dsCfg.getDataRegionConfigurations())) {
+            for (DataRegionConfiguration dataRegCfg : dsCfg.getDataRegionConfigurations()) {
+                if (dataRegCfg.isPersistenceEnabled())
+                    fail("IGNITE-5874");
+            }
         }
     }
 


[3/8] ignite git commit: IGNITE-8274 sqlline.sh script uses JAVA_HOME now

Posted by ag...@apache.org.
IGNITE-8274 sqlline.sh script uses JAVA_HOME now

Signed-off-by: Andrey Gura <ag...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c3ff274d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c3ff274d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c3ff274d

Branch: refs/heads/ignite-7708
Commit: c3ff274d4a9a8f228fabfc4bfbe85823e0cc0ec8
Parents: c000fbc
Author: oleg-ostanin <oo...@gridagin.com>
Authored: Tue Apr 17 20:58:53 2018 +0300
Committer: Andrey Gura <ag...@apache.org>
Committed: Tue Apr 17 20:58:53 2018 +0300

----------------------------------------------------------------------
 modules/sqlline/bin/sqlline.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c3ff274d/modules/sqlline/bin/sqlline.sh
----------------------------------------------------------------------
diff --git a/modules/sqlline/bin/sqlline.sh b/modules/sqlline/bin/sqlline.sh
index 5745aea..552440d 100644
--- a/modules/sqlline/bin/sqlline.sh
+++ b/modules/sqlline/bin/sqlline.sh
@@ -36,6 +36,11 @@ SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
 source "${SCRIPTS_HOME}"/include/functions.sh
 
 #
+# Discover path to Java executable and check it's version.
+#
+checkJava
+
+#
 # Discover IGNITE_HOME environment variable.
 #
 setIgniteHome
@@ -51,4 +56,4 @@ CP="${IGNITE_LIBS}"
 
 CP="${CP}${SEP}${IGNITE_HOME_TMP}/bin/include/sqlline/*"
 
-java -cp ${CP} sqlline.SqlLine -d org.apache.ignite.IgniteJdbcThinDriver $@
\ No newline at end of file
+"$JAVA" -cp ${CP} sqlline.SqlLine -d org.apache.ignite.IgniteJdbcThinDriver $@
\ No newline at end of file


[2/8] ignite git commit: IGNITE-7770 Test testRandomMixedTxConfigurations partialy fixed

Posted by ag...@apache.org.
IGNITE-7770 Test testRandomMixedTxConfigurations partialy fixed

Signed-off-by: Andrey Gura <ag...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c000fbc5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c000fbc5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c000fbc5

Branch: refs/heads/ignite-7708
Commit: c000fbc5ba0014a24f3b3a81d1607d66159abdc7
Parents: 96cb795
Author: Andrey Kuznetsov <st...@gmail.com>
Authored: Tue Apr 17 19:58:43 2018 +0300
Committer: Andrey Gura <ag...@apache.org>
Committed: Tue Apr 17 20:02:44 2018 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  3 +-
 ...arOptimisticSerializableTxPrepareFuture.java |  2 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |  2 +-
 .../GridNearPessimisticTxPrepareFuture.java     |  2 +-
 .../near/GridNearTxFastFinishFuture.java        | 10 ++--
 .../cache/distributed/near/GridNearTxLocal.java | 57 +++++++++++++-------
 .../cache/transactions/IgniteTxManager.java     |  5 +-
 .../transactions/TxRollbackOnTimeoutTest.java   |  2 +
 8 files changed, 55 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index c2d0f42..bd613a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -104,6 +104,7 @@ import org.apache.ignite.internal.processors.platform.cache.PlatformCacheEntryFi
 import org.apache.ignite.internal.processors.task.GridInternal;
 import org.apache.ignite.internal.transactions.IgniteTxHeuristicCheckedException;
 import org.apache.ignite.internal.transactions.IgniteTxRollbackCheckedException;
+import org.apache.ignite.internal.transactions.IgniteTxTimeoutCheckedException;
 import org.apache.ignite.internal.util.future.GridEmbeddedFuture;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -4283,7 +4284,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                         }
                         catch (IgniteCheckedException e1) {
                             try {
-                                tx0.rollbackNearTxLocalAsync();
+                                tx0.rollbackNearTxLocalAsync(e1 instanceof IgniteTxTimeoutCheckedException);
                             }
                             catch (Throwable e2) {
                                 if (e2 != e1)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index beb1e16..3e2c84a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -294,7 +294,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
         boolean txStateCheck = remap ? tx.state() == PREPARING : tx.state(PREPARING);
 
         if (!txStateCheck) {
-            if (tx.setRollbackOnly()) {
+            if (tx.isRollbackOnly() || tx.setRollbackOnly()) {
                 if (tx.timedOut())
                     onError(null, new IgniteTxTimeoutCheckedException("Transaction timed out and " +
                         "was rolled back: " + this));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
index 8d8c0b2..2afb096 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java
@@ -327,7 +327,7 @@ public class GridNearOptimisticTxPrepareFuture extends GridNearOptimisticTxPrepa
             boolean txStateCheck = remap ? tx.state() == PREPARING : tx.state(PREPARING);
 
             if (!txStateCheck) {
-                if (tx.setRollbackOnly()) {
+                if (tx.isRollbackOnly() || tx.setRollbackOnly()) {
                     if (tx.remainingTime() == -1)
                         onError(new IgniteTxTimeoutCheckedException("Transaction timed out and " +
                             "was rolled back: " + this), false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
index 4ab6863..54ae85c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearPessimisticTxPrepareFuture.java
@@ -155,7 +155,7 @@ public class GridNearPessimisticTxPrepareFuture extends GridNearTxPrepareFutureA
     /** {@inheritDoc} */
     @Override public void prepare() {
         if (!tx.state(PREPARING)) {
-            if (tx.setRollbackOnly()) {
+            if (tx.isRollbackOnly() || tx.setRollbackOnly()) {
                 if (tx.remainingTime() == -1)
                     onDone(new IgniteTxTimeoutCheckedException("Transaction timed out and was rolled back: " + tx));
                 else

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java
index 7222697..95e4ded 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java
@@ -37,13 +37,17 @@ public class GridNearTxFastFinishFuture extends GridFutureAdapter<IgniteInternal
     /** */
     private final boolean commit;
 
+    /** */
+    private final boolean onTimeout;
+
     /**
      * @param tx Transaction.
      * @param commit Commit flag.
      */
-    GridNearTxFastFinishFuture(GridNearTxLocal tx, boolean commit) {
+    GridNearTxFastFinishFuture(GridNearTxLocal tx, boolean commit, boolean onTimeout) {
         this.tx = tx;
         this.commit = commit;
+        this.onTimeout = onTimeout;
     }
 
     /** {@inheritDoc} */
@@ -61,7 +65,7 @@ public class GridNearTxFastFinishFuture extends GridFutureAdapter<IgniteInternal
                 tx.state(PREPARED);
                 tx.state(COMMITTING);
 
-                tx.context().tm().fastFinishTx(tx, true);
+                tx.context().tm().fastFinishTx(tx, true, true);
 
                 tx.state(COMMITTED);
             }
@@ -70,7 +74,7 @@ public class GridNearTxFastFinishFuture extends GridFutureAdapter<IgniteInternal
                 tx.state(PREPARED);
                 tx.state(ROLLING_BACK);
 
-                tx.context().tm().fastFinishTx(tx, false);
+                tx.context().tm().fastFinishTx(tx, false, !onTimeout);
 
                 tx.state(ROLLED_BACK);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index fc8a9a3..e339750 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -111,6 +111,7 @@ import static org.apache.ignite.internal.processors.cache.transactions.IgniteTxE
 import static org.apache.ignite.transactions.TransactionState.COMMITTED;
 import static org.apache.ignite.transactions.TransactionState.COMMITTING;
 import static org.apache.ignite.transactions.TransactionState.MARKED_ROLLBACK;
+import static org.apache.ignite.transactions.TransactionState.PREPARED;
 import static org.apache.ignite.transactions.TransactionState.PREPARING;
 import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK;
 import static org.apache.ignite.transactions.TransactionState.ROLLING_BACK;
@@ -165,7 +166,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
     protected boolean transform;
 
     /** */
-    private boolean trackTimeout;
+    private final boolean trackTimeout;
 
     /** */
     @GridToStringExclude
@@ -175,7 +176,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * Empty constructor required for {@link Externalizable}.
      */
     public GridNearTxLocal() {
-        // No-op.
+        this.trackTimeout = false;
     }
 
     /**
@@ -228,8 +229,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
         initResult();
 
-        if (timeout() > 0 && !implicit())
-            trackTimeout = cctx.time().addTimeoutObject(this);
+        trackTimeout = timeout() > 0 && !implicit() && cctx.time().addTimeoutObject(this);
     }
 
     /** {@inheritDoc} */
@@ -3155,8 +3155,13 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
             if (!PREP_FUT_UPD.compareAndSet(this, null, fut))
                 return prepFut;
 
-            if (trackTimeout)
-                removeTimeoutHandler();
+            if (trackTimeout) {
+                prepFut.listen(new IgniteInClosure<IgniteInternalFuture<?>>() {
+                    @Override public void apply(IgniteInternalFuture<?> f) {
+                        GridNearTxLocal.this.removeTimeoutHandler();
+                    }
+                });
+            }
 
             if (timeout == -1) {
                 fut.onDone(this, timeoutException());
@@ -3215,7 +3220,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         if (fastFinish()) {
             GridNearTxFastFinishFuture fut0;
 
-            if (!FINISH_FUT_UPD.compareAndSet(this, null, fut0 = new GridNearTxFastFinishFuture(this, true)))
+            if (!FINISH_FUT_UPD.compareAndSet(this, null, fut0 = new GridNearTxFastFinishFuture(this, true, false)))
                 return chainFinishFuture(finishFut, true);
 
             fut0.finish();
@@ -3238,7 +3243,9 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                     // Make sure that here are no exceptions.
                     prepareFut.get();
 
-                    fut0.finish(true, true);
+                    TransactionState state = state();
+
+                    fut0.finish(state == PREPARED || state == COMMITTING || state == COMMITTED, true);
                 }
                 catch (Error | RuntimeException e) {
                     COMMIT_ERR_UPD.compareAndSet(GridNearTxLocal.this, null, e);
@@ -3282,7 +3289,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
      * @param onTimeout {@code True} if rolled back asynchronously on timeout.
      * @return Rollback future.
      */
-    private IgniteInternalFuture<IgniteInternalTx> rollbackNearTxLocalAsync(final boolean onTimeout) {
+    public IgniteInternalFuture<IgniteInternalTx> rollbackNearTxLocalAsync(final boolean onTimeout) {
         if (log.isDebugEnabled())
             log.debug("Rolling back near tx: " + this);
 
@@ -3292,13 +3299,13 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         NearTxFinishFuture fut = finishFut;
 
         if (fut != null)
-            return chainFinishFuture(finishFut, false);
+            return chainFinishFuture(finishFut, false, !onTimeout);
 
         if (fastFinish()) {
             GridNearTxFastFinishFuture fut0;
 
-            if (!FINISH_FUT_UPD.compareAndSet(this, null, fut0 = new GridNearTxFastFinishFuture(this, false)))
-                return chainFinishFuture(finishFut, false);
+            if (!FINISH_FUT_UPD.compareAndSet(this, null, fut0 = new GridNearTxFastFinishFuture(this, false, onTimeout)))
+                return chainFinishFuture(finishFut, false, !onTimeout);
 
             fut0.finish();
 
@@ -3308,7 +3315,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         final GridNearTxFinishFuture fut0;
 
         if (!FINISH_FUT_UPD.compareAndSet(this, null, fut0 = new GridNearTxFinishFuture<>(cctx, this, false)))
-            return chainFinishFuture(finishFut, false);
+            return chainFinishFuture(finishFut, false, !onTimeout);
 
         cctx.mvcc().addFuture(fut0, fut0.futureId());
 
@@ -3327,7 +3334,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
 
             fut0.finish(false, !onTimeout);
         }
-        else {
+        else if (!onTimeout) {
             prepFut.listen(new CI1<IgniteInternalFuture<?>>() {
                 @Override public void apply(IgniteInternalFuture<?> f) {
                     try {
@@ -3339,10 +3346,11 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                             log.debug("Got optimistic tx failure [tx=" + this + ", err=" + e + ']');
                     }
 
-                    fut0.finish(false, !onTimeout);
+                    fut0.finish(false, true);
                 }
             });
-        }
+        } else
+            fut0.finish(false, false);
 
         return fut0;
     }
@@ -3352,12 +3360,17 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
         return rollbackNearTxLocalAsync();
     }
 
+    /** */
+    private IgniteInternalFuture<IgniteInternalTx> chainFinishFuture(final NearTxFinishFuture fut, final boolean commit) {
+        return chainFinishFuture(fut, commit, true);
+    }
+
     /**
      * @param fut Already started finish future.
      * @param commit Commit flag.
      * @return Finish future.
      */
-    private IgniteInternalFuture<IgniteInternalTx> chainFinishFuture(final NearTxFinishFuture fut, final boolean commit) {
+    private IgniteInternalFuture<IgniteInternalTx> chainFinishFuture(final NearTxFinishFuture fut, final boolean commit, final boolean clearThreadMap) {
         assert fut != null;
 
         if (fut.commit() != commit) {
@@ -3381,7 +3394,7 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
                                 if (!cctx.mvcc().addFuture(rollbackFut, rollbackFut.futureId()))
                                     return;
 
-                                rollbackFut.finish(false, true);
+                                rollbackFut.finish(false, clearThreadMap);
                             }
                         }
                     }
@@ -4161,7 +4174,13 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou
             }
         }
 
-        if (state(MARKED_ROLLBACK, true) || (state() == MARKED_ROLLBACK)) {
+        boolean proceed;
+
+        synchronized (this) {
+            proceed = state() != PREPARED && state(MARKED_ROLLBACK, true);
+        }
+
+        if (proceed || (state() == MARKED_ROLLBACK)) {
             cctx.kernalContext().closure().runLocalSafe(new Runnable() {
                 @Override public void run() {
                     // Note: if rollback asynchronously on timeout should not clear thread map

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index 9fb8777..7fa31bf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -1356,7 +1356,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
      * @param tx Transaction to finish.
      * @param commit {@code True} if transaction is committed, {@code false} if rolled back.
      */
-    public void fastFinishTx(GridNearTxLocal tx, boolean commit) {
+    public void fastFinishTx(GridNearTxLocal tx, boolean commit, boolean clearThreadMap) {
         assert tx != null;
         assert tx.writeMap().isEmpty();
         assert tx.optimistic() || tx.readMap().isEmpty();
@@ -1377,7 +1377,8 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
             removeObsolete(tx);
 
             // 4. Remove from per-thread storage.
-            clearThreadMap(tx);
+            if (clearThreadMap)
+                clearThreadMap(tx);
 
             // 5. Clear context.
             resetContext();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c000fbc5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
index c5be40e..97de81e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java
@@ -439,6 +439,8 @@ public class TxRollbackOnTimeoutTest extends GridCommonAbstractTest {
                         if (delay > 0)
                             sleep(delay);
 
+                        assert v != null;
+
                         node.cache(CACHE_NAME).put(k, v + 1);
 
                         tx.commit();