timoninmaxim commented on a change in pull request #7852:
URL: https://github.com/apache/ignite/pull/7852#discussion_r433093093
##########
File path:
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
##########
@@ -322,6 +325,33 @@ public void testTransactionalSnapshotLimitations() throws
Exception {
);
}
+ /**
+ * Check that node in client mode (filtered by AttributeNodeFilter)
correctly works with MVCC.
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testMvccEnabledForClientMode() throws Exception {
+ String attrName = "has_cache";
+ Object attrVal = Boolean.TRUE;
+
+ final IgniteEx crd = (IgniteEx)
startGrid(getTestIgniteInstanceName(0), getConfiguration());
+
+ // Do not start cache on non-affinity node.
+ CacheConfiguration ccfg = defaultCacheConfiguration()
Review comment:
Hi, this test checks MVCC mode so atomicity mode is required. Near set
is required as it must be disabled with MVCC mode. Backups dont matter
actually. Fixed it
##########
File path:
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccConfigurationValidationTest.java
##########
@@ -322,6 +325,33 @@ public void testTransactionalSnapshotLimitations() throws
Exception {
);
}
+ /**
+ * Check that node in client mode (filtered by AttributeNodeFilter)
correctly works with MVCC.
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testMvccEnabledForClientMode() throws Exception {
+ String attrName = "has_cache";
+ Object attrVal = Boolean.TRUE;
+
+ final IgniteEx crd = (IgniteEx)
startGrid(getTestIgniteInstanceName(0), getConfiguration());
+
+ // Do not start cache on non-affinity node.
+ CacheConfiguration ccfg = defaultCacheConfiguration()
+ .setNearConfiguration(null)
+ .setNodeFilter(new AttributeNodeFilter(attrName, attrVal))
+ .setBackups(0)
+ .setAtomicityMode(TRANSACTIONAL_SNAPSHOT);
+
+ final Ignite node = startGrid(getTestIgniteInstanceName(1),
getConfiguration()
+ .setCacheConfiguration(ccfg)
+ .setUserAttributes(F.asMap(attrName, attrVal)));
+
+ checkTopology(2);
+
+ assertTrue(crd.context().coordinators().mvccEnabled());
Review comment:
fixed
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
##########
@@ -1350,6 +1350,9 @@ else if (!crd && grp != null &&
grp.localStartVersion().equals(fut.initialVersio
Collection<DynamicCacheDescriptor> descs
) throws IgniteCheckedException {
IgniteInternalFuture<?> res = cachesRegistry.addUnregistered(descs);
+ for (DynamicCacheDescriptor d: descs) {
Review comment:
fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]