Repository: ignite Updated Branches: refs/heads/ignite-6149 7a9943265 -> f3f582140
ignite-6149 Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f3f58214 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f3f58214 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f3f58214 Branch: refs/heads/ignite-6149 Commit: f3f58214047d4fa1d9cb5f7ce50ac7278ee17569 Parents: 7a99432 Author: sboikov <[email protected]> Authored: Wed Sep 13 17:15:55 2017 +0300 Committer: sboikov <[email protected]> Committed: Wed Sep 13 17:15:55 2017 +0300 ---------------------------------------------------------------------- .../cache/IgniteCacheOffheapManagerImpl.java | 25 +++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f58214/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java index a507985..fece24d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java @@ -1377,6 +1377,8 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager assert oldVal.link() != 0 : oldVal; + boolean activeTx = false; + if (activeTxs != null && oldVal.mvccCoordinatorVersion() == mvccVer.coordinatorVersion() && activeTxs.contains(oldVal.mvccCounter())) { if (waitTxs == null) @@ -1385,21 +1387,22 @@ public class IgniteCacheOffheapManagerImpl implements IgniteCacheOffheapManager assert oldVal.mvccCounter() != mvccVer.counter(); waitTxs.add(oldVal.mvccCounter()); + + activeTx = true; } - else { - // Should not delete oldest version which is less then cleanup version . - int cmp = compare(oldVal, mvccVer.coordinatorVersion(), mvccVer.cleanupVersion()); - if (cmp <= 0) { - if (first) - first = false; - else { - boolean rmvd = dataTree.removex(oldVal); + // Should not delete oldest version which is less than cleanup version . + int cmp = compare(oldVal, mvccVer.coordinatorVersion(), mvccVer.cleanupVersion()); + + if (cmp <= 0) { + if (first) + first = false; + else if (!activeTx) { + boolean rmvd = dataTree.removex(oldVal); - assert rmvd; + assert rmvd; - rowStore.removeRow(oldVal.link()); - } + rowStore.removeRow(oldVal.link()); } } }
