You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2018/11/20 14:54:58 UTC

[15/50] [abbrv] ignite git commit: IGNITE-10303: SQL test failure.

IGNITE-10303: SQL test failure.


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

Branch: refs/heads/ignite-10044
Commit: 28cb3a09526db7042e4f5a3d8bf3d84406b56a60
Parents: 43ee832
Author: devozerov <pp...@gmail.com>
Authored: Sat Nov 17 22:27:01 2018 +0300
Committer: devozerov <pp...@gmail.com>
Committed: Sat Nov 17 22:27:01 2018 +0300

----------------------------------------------------------------------
 .../internal/processors/query/h2/ConnectionManager.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/28cb3a09/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ConnectionManager.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ConnectionManager.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ConnectionManager.java
index 09400c8..1d62b87 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ConnectionManager.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ConnectionManager.java
@@ -62,10 +62,11 @@ public class ConnectionManager {
     private static final Long CONN_CLEANUP_PERIOD = 2000L;
 
     /** The period of clean up the statement cache. */
-    private static final Long STMT_CLEANUP_PERIOD = Long.getLong(IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD, 10_000);
+    @SuppressWarnings("FieldCanBeLocal")
+    private final Long stmtCleanupPeriod = Long.getLong(IGNITE_H2_INDEXING_CACHE_CLEANUP_PERIOD, 10_000);
 
     /** The timeout to remove entry from the statement cache if the thread doesn't perform any queries. */
-    private static final Long STMT_TIMEOUT = Long.getLong(IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT, 600 * 1000);
+    private final Long stmtTimeout = Long.getLong(IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT, 600 * 1000);
 
     /*
      * Initialize system properties for H2.
@@ -151,7 +152,7 @@ public class ConnectionManager {
             @Override public void run() {
                 cleanupStatements();
             }
-        }, STMT_CLEANUP_PERIOD, STMT_CLEANUP_PERIOD);
+        }, stmtCleanupPeriod, stmtCleanupPeriod);
 
         connCleanupTask = ctx.timeout().schedule(new Runnable() {
             @Override public void run() {
@@ -436,7 +437,7 @@ public class ConnectionManager {
 
                 it.remove();
             }
-            else if (now - entry.getValue().statementCache().lastUsage() > STMT_TIMEOUT)
+            else if (now - entry.getValue().statementCache().lastUsage() > stmtTimeout)
                 entry.getValue().clearStatementCache();
         }
     }