You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2017/04/07 09:15:28 UTC

ignite git commit: ignite-3477 - destroy checks on api exit

Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-master 1970982a4 -> 5c6d5503e


ignite-3477 - destroy checks on api exit


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

Branch: refs/heads/ignite-3477-master
Commit: 5c6d5503ef41dea91fac70caa140c1bf798d3c5f
Parents: 1970982
Author: Sergi Vladykin <se...@gmail.com>
Authored: Fri Apr 7 12:15:05 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Fri Apr 7 12:15:05 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/database/tree/BPlusTree.java | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5c6d5503/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
index 1290e5b..f3d020b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java
@@ -944,6 +944,9 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         catch (AssertionError e) {
             throw new AssertionError("Assertion error on bounds: [lower=" + lower + ", upper=" + upper + "]", e);
         }
+        finally {
+            checkDestroyed();
+        }
     }
 
     /**
@@ -972,6 +975,9 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         catch (AssertionError e) {
             throw new AssertionError("Assertion error on lookup row: " + row, e);
         }
+        finally {
+            checkDestroyed();
+        }
     }
 
     /**
@@ -1530,6 +1536,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         }
         finally {
             x.releaseAll();
+            checkDestroyed();
         }
     }
 
@@ -1684,6 +1691,7 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         }
         finally {
             r.releaseAll();
+            checkDestroyed();
         }
     }
 
@@ -1857,6 +1865,8 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
             }
         }
 
+        checkDestroyed();
+
         return cnt;
     }
 
@@ -1931,6 +1941,9 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
         catch (AssertionError e) {
             throw new AssertionError("Assertion error on row: " + row, e);
         }
+        finally {
+            checkDestroyed();
+        }
     }
 
     /**
@@ -2249,17 +2262,14 @@ public abstract class BPlusTree<L, T extends L> extends DataStructure implements
 
         /**
          * @param g Other operation to copy from.
-         * @return {@code this}.
          */
-        final Get copyFrom(Get g) {
+        final void copyFrom(Get g) {
             rmvId = g.rmvId;
             rootLvl = g.rootLvl;
             pageId = g.pageId;
             fwdId = g.fwdId;
             backId = g.backId;
             shift = g.shift;
-
-            return this;
         }
 
         /**