ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: test
Date Wed, 25 Nov 2015 13:39:54 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-sql-opt-2 587fb9f06 -> 7d6b1e910


test


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

Branch: refs/heads/ignite-sql-opt-2
Commit: 7d6b1e9102bf1fbb37db9f911c6d7d6489e79ac5
Parents: 587fb9f
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Nov 25 16:39:45 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Nov 25 16:39:45 2015 +0300

----------------------------------------------------------------------
 .../processors/query/h2/opt/GridH2Table.java    | 55 ++++++++++----------
 1 file changed, 28 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7d6b1e91/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index df4d031..898925e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -72,7 +72,7 @@ public class GridH2Table extends TableBase {
     private final ArrayList<Index> idxs;
 
     /** */
-    private final ReadWriteLock lock;
+    //private final ReadWriteLock lock;
 
     /** */
     private final Set<Session> sessions = Collections.newSetFromMap(new ConcurrentHashMap8<Session,
Boolean>());
@@ -105,7 +105,7 @@ public class GridH2Table extends TableBase {
         assert idxs != null;
         assert idxs.size() >= 1;
 
-        lock =  new ReentrantReadWriteLock();
+        //lock = new ReentrantReadWriteLock();
 
         // Add scan index at 0 which is required by H2.
         idxs.add(0, new ScanIndex(index(0)));
@@ -168,7 +168,7 @@ public class GridH2Table extends TableBase {
 
         GridUnsafeMemory mem = desc.memory();
 
-        lock.readLock().lock();
+        //lock.readLock().lock();
 
         if (mem != null)
             desc.guard().begin();
@@ -187,7 +187,7 @@ public class GridH2Table extends TableBase {
             return true;
         }
         finally {
-            lock.readLock().unlock();
+            //lock.readLock().unlock();
 
             if (mem != null)
                 desc.guard().end();
@@ -226,13 +226,14 @@ public class GridH2Table extends TableBase {
                 return;
             }
 
-            try {
-                if (lock.writeLock().tryLock(waitTime, TimeUnit.MILLISECONDS))
-                    break;
-            }
-            catch (InterruptedException e) {
-                throw new IgniteException("Thread got interrupted while trying to acquire
index lock.", e);
-            }
+            break;
+//            try {
+//                if (lock.writeLock().tryLock(waitTime, TimeUnit.MILLISECONDS))
+//                    break;
+//            }
+//            catch (InterruptedException e) {
+//                throw new IgniteException("Thread got interrupted while trying to acquire
index lock.", e);
+//            }
         }
 
         boolean snapshoted = false;
@@ -250,7 +251,7 @@ public class GridH2Table extends TableBase {
             }
         }
         finally {
-            lock.writeLock().unlock();
+            //lock.writeLock().unlock();
         }
 
         if (!snapshoted) {
@@ -301,17 +302,17 @@ public class GridH2Table extends TableBase {
      * Closes table and releases resources.
      */
     public void close() {
-        Lock l = lock.writeLock();
-
-        l.lock();
-
-        try {
-            for (int i = 1, len = idxs.size(); i < len; i++)
-                index(i).close(null);
-        }
-        finally {
-            l.unlock();
-        }
+//        Lock l = lock.writeLock();
+//
+//        l.lock();
+//
+//        try {
+//            for (int i = 1, len = idxs.size(); i < len; i++)
+//                index(i).close(null);
+//        }
+//        finally {
+//            l.unlock();
+//        }
     }
 
     /**
@@ -367,7 +368,7 @@ public class GridH2Table extends TableBase {
         // getting updated from different threads with different rows with the same key is
impossible.
         GridUnsafeMemory mem = desc == null ? null : desc.memory();
 
-        lock.readLock().lock();
+        //lock.readLock().lock();
 
         if (mem != null)
             desc.guard().begin();
@@ -440,7 +441,7 @@ public class GridH2Table extends TableBase {
             return true;
         }
         finally {
-            lock.readLock().unlock();
+            //lock.readLock().unlock();
 
             if (mem != null)
                 desc.guard().end();
@@ -479,7 +480,7 @@ public class GridH2Table extends TableBase {
     public void rebuildIndexes() {
         GridUnsafeMemory memory = desc == null ? null : desc.memory();
 
-        lock.writeLock().lock();
+       // lock.writeLock().lock();
 
         try {
             if (memory == null && actualSnapshot == null)
@@ -498,7 +499,7 @@ public class GridH2Table extends TableBase {
             // No-op.
         }
         finally {
-            lock.writeLock().unlock();
+            //lock.writeLock().unlock();
 
             actualSnapshot = null;
         }


Mime
View raw message