Repository: ignite Updated Branches: refs/heads/ignite-2.7 7079b9f7c -> 683480578
IGNITE-9932 Ignoring exchanger critical section begin/end if called from illegal thread. - Fixes #5026. Signed-off-by: Alexey Goncharuk <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/68348057 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/68348057 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/68348057 Branch: refs/heads/ignite-2.7 Commit: 6834805781ae42f5e54fcfa5d53413476d6067e4 Parents: 7079b9f Author: Andrey Kuznetsov <[email protected]> Authored: Mon Oct 22 10:33:09 2018 +0300 Committer: Alexey Goncharuk <[email protected]> Committed: Mon Oct 22 10:49:19 2018 +0300 ---------------------------------------------------------------------- .../cache/GridCachePartitionExchangeManager.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/68348057/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java index 1323811..eb89010 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java @@ -2269,9 +2269,8 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana * Should be called from exchange worker thread. */ public void exchangerBlockingSectionBegin() { - assert exchWorker != null && Thread.currentThread() == exchWorker.runner(); - - exchWorker.blockingSectionBegin(); + if (currentThreadIsExchanger()) + exchWorker.blockingSectionBegin(); } /** @@ -2279,9 +2278,13 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana * Should be called from exchange worker thread. */ public void exchangerBlockingSectionEnd() { - assert exchWorker != null && Thread.currentThread() == exchWorker.runner(); + if (currentThreadIsExchanger()) + exchWorker.blockingSectionEnd(); + } - exchWorker.blockingSectionEnd(); + /** */ + private boolean currentThreadIsExchanger() { + return exchWorker != null && Thread.currentThread() == exchWorker.runner(); } /**
