ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject ignite git commit: # Conflicts:
Date Thu, 02 Aug 2018 12:38:01 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-8714 [created] 981bb8c0c


# Conflicts:

Signed-off-by: Anton Vinogradov <av@apache.org>
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java


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

Branch: refs/heads/ignite-8714
Commit: 981bb8c0c0b40f97f0c2b8c284d8ae821250257a
Parents: d632eb6
Author: Anton Vinogradov <av@apache.org>
Authored: Thu Aug 2 15:37:43 2018 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Thu Aug 2 15:37:43 2018 +0300

----------------------------------------------------------------------
 .../datastructures/CacheDataStructuresManager.java  |  5 +++--
 .../continuous/CacheContinuousQueryManager.java     |  4 ++--
 .../processors/service/GridServiceProcessor.java    |  5 +++--
 .../cache/IgniteCacheEntryListenerAbstractTest.java | 16 ++++++++--------
 ...inuousQueryFactoryFilterRandomOperationTest.java |  6 +++---
 .../CacheContinuousQueryRandomOperationsTest.java   | 15 ++++++++-------
 .../CacheContinuousQueryVariationsTest.java         | 12 ++++++------
 ...ContinuousWithTransformerReplicatedSelfTest.java |  2 +-
 .../GridCacheContinuousQueryAbstractSelfTest.java   |  6 +++---
 .../cpp/core-test/src/continuous_query_test.cpp     |  6 +++---
 .../Query/Continuous/ContinuousQueryAbstractTest.cs | 10 +++++-----
 .../Impl/Cache/Event/CacheEntryRemoveEvent.cs       |  4 ++--
 .../Cache/Query/Continuous/ContinuousQueryUtils.cs  |  2 +-
 13 files changed, 48 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
index ccfdc15..7d45c81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/datastructures/CacheDataStructuresManager.java
@@ -29,6 +29,7 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -70,8 +71,8 @@ import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.resources.IgniteInstanceResource;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-import java.util.concurrent.ConcurrentHashMap;
 
+import static javax.cache.event.EventType.REMOVED;
 import static org.apache.ignite.internal.GridClosureCallMode.BROADCAST;
 
 /**
@@ -294,7 +295,7 @@ public class CacheDataStructuresManager extends GridCacheManagerAdapter
{
 
                                     for (final GridCacheQueueProxy queue : queuesMap.values())
{
                                         if (queue.name().equals(key.queueName())) {
-                                            if (hdr == null) {
+                                            if (e.getEventType() == REMOVED) {
                                                 GridCacheQueueHeader oldHdr = (GridCacheQueueHeader)e.getOldValue();
 
                                                 assert oldHdr != null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
index c7635e0..4005dd8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryManager.java
@@ -380,7 +380,7 @@ public class CacheContinuousQueryManager extends GridCacheManagerAdapter
{
                 cctx.cacheId(),
                 evtType,
                 key,
-                newVal,
+                evtType == REMOVED && lsnr.oldValueRequired() ? oldVal : newVal,
                 lsnr.oldValueRequired() ? oldVal : null,
                 lsnr.keepBinary(),
                 partId,
@@ -442,7 +442,7 @@ public class CacheContinuousQueryManager extends GridCacheManagerAdapter
{
                     cctx.cacheId(),
                     EXPIRED,
                     key,
-                    null,
+                    lsnr.oldValueRequired() ? oldVal : null,
                     lsnr.oldValueRequired() ? oldVal : null,
                     lsnr.keepBinary(),
                     e.partition(),

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
index 0f29791..949c0c7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java
@@ -111,6 +111,7 @@ import org.apache.ignite.thread.OomExceptionHandler;
 import org.apache.ignite.transactions.Transaction;
 import org.jetbrains.annotations.Nullable;
 
+import static javax.cache.event.EventType.REMOVED;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_SERVICES_COMPATIBILITY_MODE;
 import static org.apache.ignite.IgniteSystemProperties.getString;
 import static org.apache.ignite.configuration.DeploymentMode.ISOLATED;
@@ -1633,7 +1634,7 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
                 throw ex;
         }
 
-        if (dep != null) {
+        if (e.getEventType() != REMOVED) {
             svcName.set(dep.configuration().getName());
 
             // Ignore other utility cache events.
@@ -1980,7 +1981,7 @@ public class GridServiceProcessor extends GridProcessorAdapter implements
Ignite
                 throw ex;
         }
 
-        if (assigns != null) {
+        if (e.getEventType() != REMOVED) {
             svcName.set(assigns.name());
 
             Throwable t = null;

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index c6e3552..74b4253 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -314,7 +314,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
                 syncEvent(key, null, cache, 1);
 
-                checkEvent(evts.iterator(), key, REMOVED, null, 2);
+                checkEvent(evts.iterator(), key, REMOVED, 2, 2);
 
                 log.info("Check synchronous expire event [key=" + key + ']');
 
@@ -335,7 +335,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
                     assertEquals(1, evts.size());
                 }
 
-                checkEvent(evts.iterator(), key, EXPIRED, null, 3);
+                checkEvent(evts.iterator(), key, EXPIRED, 3, 3);
 
                 assertEquals(0, evts.size());
             }
@@ -764,7 +764,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
             switch (evt.getEventType()) {
                 case REMOVED:
-                    assertNull(evt.getValue());
+                    assertEquals(evt.getOldValue(), evt.getValue());
 
                     assertEquals(vals.get(evt.getKey()), evt.getOldValue());
 
@@ -797,7 +797,7 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
                     break;
 
                 case EXPIRED:
-                    assertNull(evt.getValue());
+                    assertEquals(evt.getOldValue(), evt.getValue());
 
                     assertEquals(value(-1), evt.getOldValue());
 
@@ -934,13 +934,13 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
         }
 
         if (rmv)
-            checkEvent(iter, key, REMOVED, null, oldVal ? UPDATES : null);
+            checkEvent(iter, key, REMOVED, oldVal ? UPDATES : null, oldVal ? UPDATES : null);
 
         if (create)
             checkEvent(iter, key, CREATED, 10, null);
 
         if (expire)
-            checkEvent(iter, key, EXPIRED, null, oldVal ? 10 : null);
+            checkEvent(iter, key, EXPIRED, oldVal ? 10 : null, oldVal ? 10 : null);
 
         if (create)
             checkEvent(iter, key, CREATED, 1, null);
@@ -949,13 +949,13 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
             checkEvent(iter, key, UPDATED, 2, oldVal ? 1 : null);
 
         if (rmv)
-            checkEvent(iter, key, REMOVED, null, oldVal ? 2 : null);
+            checkEvent(iter, key, REMOVED, oldVal ? 2 : null, oldVal ? 2 : null);
 
         if (create)
             checkEvent(iter, key, CREATED, 20, null);
 
         if (expire)
-            checkEvent(iter, key, EXPIRED, null, oldVal ? 20 : null);
+            checkEvent(iter, key, EXPIRED, oldVal ? 20 : null, oldVal ? 20 : null);
 
         assertEquals(0, evts.size());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
index 69799ef..993ef79 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
@@ -319,7 +319,7 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends
CacheC
 
                     updatePartitionCounter(cache, key, partCntr);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, oldVal,
oldVal);
 
                     expData.remove(key);
 
@@ -334,7 +334,7 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends
CacheC
 
                     updatePartitionCounter(cache, key, partCntr);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, oldVal,
oldVal);
 
                     expData.remove(key);
 
@@ -364,7 +364,7 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends
CacheC
 
                     updatePartitionCounter(cache, key, partCntr);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, affinity(cache), key, oldVal,
oldVal);
 
                     expData.remove(key);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
index 1c6bd8c..6d15df2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
@@ -81,6 +81,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static javax.cache.event.EventType.CREATED;
 import static javax.cache.event.EventType.REMOVED;
+import static javax.cache.event.EventType.UPDATED;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
@@ -554,12 +555,12 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
                     }, 5_000);
 
                     checkSingleEvent(evts.get(0), CREATED, new QueryTestValue(1), null);
-                    checkSingleEvent(evts.get(1), REMOVED, null, new QueryTestValue(1));
+                    checkSingleEvent(evts.get(1), REMOVED, new QueryTestValue(1), new QueryTestValue(1));
                     checkSingleEvent(evts.get(2), CREATED, new QueryTestValue(2), null);
-                    checkSingleEvent(evts.get(3), REMOVED, null, new QueryTestValue(2));
+                    checkSingleEvent(evts.get(3), REMOVED, new QueryTestValue(2), new QueryTestValue(2));
                     checkSingleEvent(evts.get(4), CREATED, new QueryTestValue(3), null);
                     checkSingleEvent(evts.get(5), EventType.UPDATED, new QueryTestValue(4),
new QueryTestValue(3));
-                    checkSingleEvent(evts.get(6), REMOVED, null, new QueryTestValue(4));
+                    checkSingleEvent(evts.get(6), REMOVED, new QueryTestValue(4), new QueryTestValue(4));
                     checkSingleEvent(evts.get(7), CREATED, new QueryTestValue(5), null);
                     checkSingleEvent(evts.get(8), EventType.UPDATED, new QueryTestValue(6),
new QueryTestValue(5));
 
@@ -699,7 +700,7 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
                 if (e.getKey().equals(keyVal)) {
                     checkSingleEvent(e,
                         evtType,
-                        evtType == CREATED ? new QueryTestValue(key) : null,
+                        evtType != UPDATED ? new QueryTestValue(key) : null,
                         evtType == REMOVED ? new QueryTestValue(key) : null);
 
                     keyVal = null;
@@ -1032,7 +1033,7 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
 
                     updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, oldVal, oldVal);
 
                     expData.remove(key);
 
@@ -1047,7 +1048,7 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
 
                     updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, oldVal, oldVal);
 
                     expData.remove(key);
 
@@ -1077,7 +1078,7 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
 
                     updatePartitionCounter(cache, key, partCntr, expEvtCntrs);
 
-                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, null, oldVal);
+                    waitAndCheckEvent(evtsQueues, partCntr, expEvtCntrs, affinity(cache),
key, oldVal, oldVal);
 
                     expData.remove(key);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java
index ab086bc..fc86a35 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryVariationsTest.java
@@ -362,7 +362,7 @@ public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariati
                     if (tx != null)
                         tx.commit();
 
-                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
+                    waitAndCheckEvent(evtsQueues, key, oldVal, oldVal, keepBinary, withFilter);
 
                     expData.remove(key);
 
@@ -375,7 +375,7 @@ public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariati
                     if (tx != null)
                         tx.commit();
 
-                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
+                    waitAndCheckEvent(evtsQueues, key, oldVal, oldVal, keepBinary, withFilter);
 
                     expData.remove(key);
 
@@ -401,7 +401,7 @@ public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariati
                     if (tx != null)
                         tx.commit();
 
-                    waitAndCheckEvent(evtsQueues, key, null, oldVal, keepBinary, withFilter);
+                    waitAndCheckEvent(evtsQueues, key, oldVal, oldVal, keepBinary, withFilter);
 
                     expData.remove(key);
 
@@ -701,12 +701,12 @@ public class CacheContinuousQueryVariationsTest extends IgniteCacheConfigVariati
                         }, 5_000);
 
                         checkEvent(evts.get(0), CREATED, value(1), null);
-                        checkEvent(evts.get(1), REMOVED, null, value(1));
+                        checkEvent(evts.get(1), REMOVED, value(1), value(1));
                         checkEvent(evts.get(2), CREATED, value(2), null);
-                        checkEvent(evts.get(3), REMOVED, null, value(2));
+                        checkEvent(evts.get(3), REMOVED, value(2), value(2));
                         checkEvent(evts.get(4), CREATED, value(3), null);
                         checkEvent(evts.get(5), EventType.UPDATED, value(4), value(3));
-                        checkEvent(evts.get(6), REMOVED, null, value(4));
+                        checkEvent(evts.get(6), REMOVED, value(4), value(4));
                         checkEvent(evts.get(7), CREATED, value(5), null);
                         checkEvent(evts.get(8), EventType.UPDATED, value(6), value(5));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java
index 7b53fb2..7aa91a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousWithTransformerReplicatedSelfTest.java
@@ -319,7 +319,7 @@ public class CacheContinuousWithTransformerReplicatedSelfTest extends
GridCommon
         qry.setRemoteTransformerFactory(FactoryBuilder.factoryOf(
             new IgniteClosure<CacheEntryEvent<? extends Integer, ? extends Employee>,
Integer>() {
                 @Override public Integer apply(CacheEntryEvent<? extends Integer, ? extends
Employee> evt) {
-                    assertNull(evt.getValue());
+                    assertNotNull(evt.getValue());
 
                     assertNotNull(evt.getOldValue());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 61acf14..d09aea3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -338,7 +338,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends
GridCommo
             assertNotNull(vals);
             assertEquals(2, vals.size());
             assertEquals(2, (int)vals.get(0));
-            assertNull(vals.get(1));
+            assertEquals(2, (int)vals.get(1));
 
             vals = map.get(3);
 
@@ -564,7 +564,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends
GridCommo
             assertNotNull(vals);
             assertEquals(2, vals.size());
             assertEquals(3, (int)vals.get(0));
-            assertNull(vals.get(1));
+            assertEquals(3, (int)vals.get(1));
 
             vals = map.get(4);
 
@@ -1136,7 +1136,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends
GridCommo
             @Override public void onUpdated(Iterable<CacheEntryEvent<?, ?>> evts)
{
                 for (CacheEntryEvent<?, ?> e : evts) {
                     if (e.getEventType() == EventType.EXPIRED) {
-                        assertNull(e.getValue());
+                        assertEquals(e.getOldValue(), e.getValue());
 
                         map.put(e.getKey(), e.getOldValue());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
index b869eb6..a5136d2 100644
--- a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
@@ -366,7 +366,7 @@ void CheckEvents(Cache<int, TestEntry>& cache, Listener<int,
TestEntry>& lsnr)
     lsnr.CheckNextEvent(2, boost::none, TestEntry(20));
 
     cache.Remove(1);
-    lsnr.CheckNextEvent(1, TestEntry(20), boost::none);
+    lsnr.CheckNextEvent(1, TestEntry(20), TestEntry(20));
 }
 
 IGNITE_EXPORTED_CALL void IgniteModuleInit0(ignite::IgniteBindingContext& context)
@@ -712,7 +712,7 @@ BOOST_AUTO_TEST_CASE(TestFilterSingleNode)
 
     lsnr.CheckNextEvent(142, boost::none, TestEntry(1420));
     lsnr.CheckNextEvent(142, TestEntry(1420), TestEntry(1421));
-    lsnr.CheckNextEvent(142, TestEntry(1421), boost::none);
+    lsnr.CheckNextEvent(142, TestEntry(1421), TestEntry(1421));
 
     lsnr.CheckNextEvent(149, boost::none, TestEntry(1490));
 }
@@ -762,7 +762,7 @@ BOOST_AUTO_TEST_CASE(TestFilterMultipleNodes)
 
     lsnr.CheckNextEvent(142, boost::none, TestEntry(1420));
     lsnr.CheckNextEvent(142, TestEntry(1420), TestEntry(1421));
-    lsnr.CheckNextEvent(142, TestEntry(1421), boost::none);
+    lsnr.CheckNextEvent(142, TestEntry(1421), TestEntry(1421));
 
     lsnr.CheckNextEvent(149, boost::none, TestEntry(1490));
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 2df2f35..7326a82 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -217,7 +217,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 CheckCallbackSingle(key1, Entry(key1), Entry(key1 + 1), CacheEntryEventType.Updated);
 
                 cache1.Remove(key1);
-                CheckCallbackSingle(key1, Entry(key1 + 1), null, CacheEntryEventType.Removed);
+                CheckCallbackSingle(key1, Entry(key1 + 1), Entry(key1 + 1), CacheEntryEventType.Removed);
 
                 // Put from remote node.
                 cache2.GetAndPut(key2, Entry(key2));
@@ -239,7 +239,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 if (loc)
                     CheckNoCallback(100);
                 else
-                    CheckCallbackSingle(key2, Entry(key2 + 1), null, CacheEntryEventType.Removed);
+                    CheckCallbackSingle(key2, Entry(key2 + 1), Entry(key2 + 1), CacheEntryEventType.Removed);
             }
 
             cache1.Put(key1, Entry(key1));
@@ -652,10 +652,10 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
                 Assert.IsTrue(CB_EVTS.TryTake(out cbEvt, 500));
                 cbEntry = cbEvt.entries.Single();
                 Assert.IsTrue(cbEntry.HasOldValue);
-                Assert.IsFalse(cbEntry.HasValue);
+                Assert.IsTrue(cbEntry.HasValue);
                 Assert.AreEqual(key, cbEntry.Key);
                 Assert.AreEqual(2, cbEntry.OldValue);
-                Assert.AreEqual(null, cbEntry.Value);
+                Assert.AreEqual(2, cbEntry.Value);
             }
         }
 
@@ -948,7 +948,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
             if (!e.HasOldValue)
                 return new CacheEntryCreateEvent<object, object>(e.Key, e.Value);
 
-            if (!e.HasValue)
+            if (e.Value.Equals(e.OldValue))
                 return new CacheEntryRemoveEvent<object, object>(e.Key, e.OldValue);
 
             return new CacheEntryUpdateEvent<object, object>(e.Key, e.OldValue, e.Value);

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Event/CacheEntryRemoveEvent.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Event/CacheEntryRemoveEvent.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Event/CacheEntryRemoveEvent.cs
index cce3d65..eee1626 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Event/CacheEntryRemoveEvent.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Event/CacheEntryRemoveEvent.cs
@@ -50,7 +50,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Event
         /** <inheritdoc /> */
         public TV Value
         {
-            get { return default(TV); }
+            get { return _oldVal; }
         }
 
         /** <inheritdoc /> */
@@ -62,7 +62,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Event
         /** <inheritdoc /> */
         public bool HasValue
         {
-            get { return false; }
+            get { return true; }
         }
 
         /** <inheritdoc /> */

http://git-wip-us.apache.org/repos/asf/ignite/blob/981bb8c0/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryUtils.cs
b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryUtils.cs
index 729b251..71b0580 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryUtils.cs
@@ -87,7 +87,7 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
             if (!hasOldVal)
                 return new CacheEntryCreateEvent<TK, TV>(key, val);
 
-            if (!hasVal)
+            if (val.Equals(oldVal))
                 return new CacheEntryRemoveEvent<TK, TV>(key, oldVal);
 
             return new CacheEntryUpdateEvent<TK, TV>(key, oldVal, val);


Mime
View raw message