This is an automated email from the ASF dual-hosted git repository.

irakov 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 41e8a93  IGNITE-13041 PDS (Indexing) is failed with 137 code - Fixes 
#7820.
41e8a93 is described below

commit 41e8a93f4991278c94503c186b60cdc9b2776fd4
Author: Anton Kalashnikov <kaa....@yandex.ru>
AuthorDate: Thu May 28 21:06:53 2020 +0300

    IGNITE-13041 PDS (Indexing) is failed with 137 code - Fixes #7820.
    
    Signed-off-by: Ivan Rakov <ivan.glu...@gmail.com>
---
 .../IgnitePdsBinaryMetadataAsyncWritingTest.java       | 18 ++++++++++++++++--
 .../IgnitePdsCacheRebalancingAbstractTest.java         |  8 ++++----
 .../cache/persistence/IgnitePdsCorruptedIndexTest.java |  2 +-
 .../db/IgniteSequentialNodeCrashRecoveryTest.java      |  2 +-
 .../persistence/db/wal/IgniteWalRecoveryPPCTest.java   |  8 ++++----
 .../cache/persistence/db/wal/WalOnNodeStartTest.java   |  1 +
 .../persistence/db/wal/IgniteWalRecoveryTest.java      |  4 ++--
 7 files changed, 29 insertions(+), 14 deletions(-)

diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataAsyncWritingTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataAsyncWritingTest.java
index 2003ade..f75f5c7 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataAsyncWritingTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsBinaryMetadataAsyncWritingTest.java
@@ -85,6 +85,7 @@ public class IgnitePdsBinaryMetadataAsyncWritingTest extends 
GridCommonAbstractT
             new DataStorageConfiguration()
                 .setDefaultDataRegionConfiguration(
                     new DataRegionConfiguration()
+                        .setMaxSize(50 * 1024 * 1024)
                         .setPersistenceEnabled(true)
                 )
                 .setFileIOFactory(
@@ -473,7 +474,7 @@ public class IgnitePdsBinaryMetadataAsyncWritingTest 
extends GridCommonAbstractT
 
         fileWriteLatch.countDown();
 
-        assertTrue(GridTestUtils.waitForCondition(() -> map.isEmpty(), 5_000));
+        assertTrue(GridTestUtils.waitForCondition(map::isEmpty, 15_000));
     }
 
     /**
@@ -581,13 +582,26 @@ public class IgnitePdsBinaryMetadataAsyncWritingTest 
extends GridCommonAbstractT
     private int findAffinityKeyForNode(Affinity aff, ClusterNode targetNode, 
Integer... excludeKeys) {
         int key = 0;
 
-        while (true) {
+        while (key < 100) {
             if (aff.isPrimary(targetNode, key)
                 && (excludeKeys != null ? 
!Arrays.asList(excludeKeys).contains(Integer.valueOf(key)) : true))
                 return key;
 
             key++;
         }
+        //Unreachable line in success scenario.
+        //Diagnostic info:
+        while (key >= 0) {
+            log.warning("Unmapped KEY = " + key
+                + " : nodes = " + aff.mapKeyToPrimaryAndBackups(key)
+                + " : parition = " + aff.partition(key));
+
+            key--;
+        }
+
+        log.warning("Target node primary partitions : " + 
Arrays.toString(aff.primaryPartitions(targetNode)));
+
+        throw new IllegalStateException("Impossible to find affinity key for 
node = " + targetNode + ", affinity = " + aff);
     }
 
     /** */
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
index fde3ee8..1720469 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCacheRebalancingAbstractTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache.persistence;
 
-import com.google.common.collect.Lists;
+import javax.cache.Cache;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -34,7 +34,7 @@ import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
-import javax.cache.Cache;
+import com.google.common.collect.Lists;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
@@ -160,10 +160,10 @@ public abstract class 
IgnitePdsCacheRebalancingAbstractTest extends GridCommonAb
             .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
                 .setName("dfltDataRegion")
                 .setPersistenceEnabled(true)
-                .setMaxSize(512 * 1024 * 1024)
+                .setMaxSize(256 * 1024 * 1024)
             ).setDataRegionConfigurations(new DataRegionConfiguration()
                 .setName(IN_MEMORY_REGION)
-                .setMaxSize(512 * 1024 * 1024)
+                .setMaxSize(256 * 1024 * 1024)
             );
 
         cfg.setDataStorageConfiguration(dsCfg);
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
index 89ab8b4..cf24ac9 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedIndexTest.java
@@ -77,7 +77,7 @@ public class IgnitePdsCorruptedIndexTest extends 
GridCommonAbstractTest {
             .setCheckpointFrequency(10 * 60 * 1000)
             .setDefaultDataRegionConfiguration(
                 new DataRegionConfiguration()
-                    .setMaxSize(512 * 1024 * 1024)
+                    .setMaxSize(256 * 1024 * 1024)
                     .setPersistenceEnabled(true)
             );
 
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java
index 27e387f..216d1c2 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgniteSequentialNodeCrashRecoveryTest.java
@@ -76,7 +76,7 @@ public class IgniteSequentialNodeCrashRecoveryTest extends 
GridCommonAbstractTes
         DataStorageConfiguration dsCfg = new DataStorageConfiguration()
             .setDefaultDataRegionConfiguration(
                 new DataRegionConfiguration()
-                    .setMaxSize(512 * 1024 * 1024).setPersistenceEnabled(true))
+                    .setMaxSize(256 * 1024 * 1024).setPersistenceEnabled(true))
             // Set large checkpoint frequency to make sure no checkpoint 
happens right after the node start.
             .setCheckpointFrequency(getTestTimeout())
             .setPageSize(PAGE_SIZE);
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java
index 8590ed4..c7f357b 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java
@@ -85,16 +85,16 @@ public class IgniteWalRecoveryPPCTest extends 
GridCommonAbstractTest {
         dbCfg.setPageSize(4 * 1024);
 
         DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
-        memPlcCfg.setInitialSize(1024L * 1024 * 1024);
-        memPlcCfg.setMaxSize(1024L * 1024 * 1024);
+        memPlcCfg.setInitialSize(256L * 1024 * 1024);
+        memPlcCfg.setMaxSize(256L * 1024 * 1024);
         memPlcCfg.setPersistenceEnabled(true);
 
         dbCfg.setDefaultDataRegionConfiguration(memPlcCfg);
 
         DataRegionConfiguration memPlcCfg2 = new DataRegionConfiguration();
         memPlcCfg2.setName(MEM_PLC_NO_PDS);
-        memPlcCfg2.setInitialSize(1024L * 1024 * 1024);
-        memPlcCfg2.setMaxSize(1024L * 1024 * 1024);
+        memPlcCfg2.setInitialSize(256L * 1024 * 1024);
+        memPlcCfg2.setMaxSize(256L * 1024 * 1024);
         memPlcCfg2.setPersistenceEnabled(false);
 
         dbCfg.setDataRegionConfigurations(memPlcCfg2);
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalOnNodeStartTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalOnNodeStartTest.java
index e7e0c97..cf90ee1 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalOnNodeStartTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalOnNodeStartTest.java
@@ -52,6 +52,7 @@ public class WalOnNodeStartTest extends 
GridCommonAbstractTest {
                 .setWalSegments(3)
                 .setDefaultDataRegionConfiguration(
                     new DataRegionConfiguration()
+                        .setMaxSize(50 * 1024 * 1024)
                         .setPersistenceEnabled(true)
                 )
         );
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
index c34468f..c448af5 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryTest.java
@@ -208,8 +208,8 @@ public class IgniteWalRecoveryTest extends 
GridCommonAbstractTest {
         DataRegionConfiguration memPlcCfg = new DataRegionConfiguration();
 
         memPlcCfg.setName("dfltDataRegion");
-        memPlcCfg.setInitialSize(1024L * 1024 * 1024);
-        memPlcCfg.setMaxSize(1024L * 1024 * 1024);
+        memPlcCfg.setInitialSize(256L * 1024 * 1024);
+        memPlcCfg.setMaxSize(256L * 1024 * 1024);
         memPlcCfg.setPersistenceEnabled(true);
 
         dbCfg.setDefaultDataRegionConfiguration(memPlcCfg);

Reply via email to