You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2018/10/24 09:32:35 UTC
ignite git commit: IGNITE-9899 Notify CQ filter on backups - Fixes
#5011.
Repository: ignite
Updated Branches:
refs/heads/master 5e989bddb -> 0d7535340
IGNITE-9899 Notify CQ filter on backups - Fixes #5011.
Signed-off-by: Alexey Goncharuk <al...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0d753534
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0d753534
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0d753534
Branch: refs/heads/master
Commit: 0d7535340b61df0c327fd6afe9d3519a248ee350
Parents: 5e989bd
Author: Denis Mekhanikov <dm...@gmail.com>
Authored: Wed Oct 24 12:24:46 2018 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Oct 24 12:24:46 2018 +0300
----------------------------------------------------------------------
.../processors/cache/GridCacheMapEntry.java | 13 +++----
...eContinuousQueryAsyncFailoverTxSelfTest.java | 5 ---
.../CacheContinuousQueryFailoverTxSelfTest.java | 5 ---
...ontinuousQueryOperationFromCallbackTest.java | 36 ++++++++++++++++++++
4 files changed, 41 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/0d753534/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index c753296..347e260 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1462,7 +1462,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
boolean internal = isInternal() || !context().userCache();
Map<UUID, CacheContinuousQueryListener> lsnrCol =
- notifyContinuousQueries(tx) ?
+ notifyContinuousQueries() ?
cctx.continuousQueries().updateListeners(internal, false) : null;
if (startVer && (retval || intercept || lsnrCol != null))
@@ -1695,7 +1695,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
boolean internal = isInternal() || !context().userCache();
Map<UUID, CacheContinuousQueryListener> lsnrCol =
- notifyContinuousQueries(tx) ?
+ notifyContinuousQueries() ?
cctx.continuousQueries().updateListeners(internal, false) : null;
if (startVer && (retval || intercept || lsnrCol != null))
@@ -2949,13 +2949,10 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
/**
- * @param tx Transaction.
- * @return {@code True} if should notify continuous query manager.
+ * @return {@code True} if should notify continuous query manager on updates of this entry.
*/
- private boolean notifyContinuousQueries(@Nullable IgniteInternalTx tx) {
- return cctx.isLocal() ||
- cctx.isReplicated() ||
- (!isNear() && !(tx != null && tx.onePhaseCommit() && !tx.local()));
+ private boolean notifyContinuousQueries() {
+ return !isNear();
}
/**
http://git-wip-us.apache.org/repos/asf/ignite/blob/0d753534/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverTxSelfTest.java
index 0417022..8f0bd0e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFailoverTxSelfTest.java
@@ -41,9 +41,4 @@ public class CacheContinuousQueryAsyncFailoverTxSelfTest extends CacheContinuous
@Override protected boolean asyncCallback() {
return true;
}
-
- /** {@inheritDoc} */
- @Override public void testNoEventLossOnTopologyChange() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4015");
- }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0d753534/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxSelfTest.java
index cd916e4..789a105 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxSelfTest.java
@@ -36,9 +36,4 @@ public class CacheContinuousQueryFailoverTxSelfTest extends CacheContinuousQuery
@Override protected CacheAtomicityMode atomicityMode() {
return TRANSACTIONAL;
}
-
- /** {@inheritDoc} */
- @Override public void testNoEventLossOnTopologyChange() throws Exception {
- fail("https://issues.apache.org/jira/browse/IGNITE-4015");
- }
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/0d753534/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java
index 0540b43..a9e3d43 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationFromCallbackTest.java
@@ -136,6 +136,42 @@ public class CacheContinuousQueryOperationFromCallbackTest extends GridCommonAbs
/**
* @throws Exception If failed.
*/
+ public void testAtomicOneBackup() throws Exception {
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, FULL_SYNC);
+
+ doTest(ccfg, true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxOneBackupFilter() throws Exception {
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, FULL_SYNC);
+
+ doTest(ccfg, false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxOneBackupFilterPrimary() throws Exception {
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, PRIMARY_SYNC);
+
+ doTest(ccfg, false);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
+ public void testTxOneBackup() throws Exception {
+ CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, FULL_SYNC);
+
+ doTest(ccfg, true);
+ }
+
+ /**
+ * @throws Exception If failed.
+ */
public void testAtomicTwoBackups() throws Exception {
CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, FULL_SYNC);