You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sk...@apache.org on 2022/02/24 09:40:14 UTC
[ignite] branch master updated: IGNITE-16610 Fixed detection of in-memory caches. Fixes #9843
This is an automated email from the ASF dual-hosted git repository.
sk0x50 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 0128d14 IGNITE-16610 Fixed detection of in-memory caches. Fixes #9843
0128d14 is described below
commit 0128d14bfc71463a493e99731d9c417fa809fd17
Author: Slava Koptilin <sl...@gmail.com>
AuthorDate: Thu Feb 24 12:39:45 2022 +0300
IGNITE-16610 Fixed detection of in-memory caches. Fixes #9843
---
.../org/apache/ignite/internal/processors/cache/GridCacheUtils.java | 6 ++++--
.../cache/IgniteClusterActivateDeactivateTestWithPersistence.java | 5 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 01eb84a..d0ebb8e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -1974,15 +1974,16 @@ public class GridCacheUtils {
* @param name Name of data region configuration to find.
* @return Data region configuration with the specified name
* or {@code null} if the given data storage configuration does not contain such data region.
+ * If the {@code name} of required data region is {@code null}, the default data region is returned.
*/
@Nullable public static DataRegionConfiguration findDataRegionConfiguration(
@Nullable DataStorageConfiguration dsCfg,
@Nullable String name
) {
- if (dsCfg == null || name == null)
+ if (dsCfg == null)
return null;
- if (dsCfg.getDefaultDataRegionConfiguration().getName().equals(name))
+ if (name == null || dsCfg.getDefaultDataRegionConfiguration().getName().equals(name))
return dsCfg.getDefaultDataRegionConfiguration();
DataRegionConfiguration[] regions = dsCfg.getDataRegionConfigurations();
@@ -2007,6 +2008,7 @@ public class GridCacheUtils {
* @param name Name of data region configuration to find.
* @return Data region configuration with the specified name
* or {@code null} if the given data storage configuration does not contain such data region.
+ * If the {@code name} of required data region is {@code null}, the default data region is returned.
*/
@Nullable public static DataRegionConfiguration findRemoteDataRegionConfiguration(
ClusterNode node,
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
index bb05795..a77dbd5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClusterActivateDeactivateTestWithPersistence.java
@@ -136,8 +136,9 @@ public class IgniteClusterActivateDeactivateTestWithPersistence extends IgniteCl
"It is assumed that the default data storage region is persistent.",
dfltDataRegion.isPersistenceEnabled());
- // Create a new cache that is placed into pesristent data region.
- clientNode.getOrCreateCache(new CacheConfiguration<>("test-client-cache")
+ // Create new caches that are placed into the default pesristent data region.
+ clientNode.getOrCreateCache(new CacheConfiguration<>("test-client-cache-default-region-implicit"));
+ clientNode.getOrCreateCache(new CacheConfiguration<>("test-client-cache-default-region-explicit")
.setDataRegionName(dfltDataRegion.getName()));
// Try to deactivate the cluster without the `force` flag.