You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by vo...@apache.org on 2018/05/05 19:07:20 UTC
[drill] 06/06: DRILL-6380: Fix sporadic mongo db hangs.
This is an automated email from the ASF dual-hosted git repository.
volodymyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
commit 6cbba282d17d1670da5dd8788d1318a77abc0bf7
Author: Timothy Farkas <ti...@apache.org>
AuthorDate: Wed May 2 01:21:10 2018 -0700
DRILL-6380: Fix sporadic mongo db hangs.
closes #1249
---
.../org/apache/drill/exec/store/mongo/MongoTestSuit.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java b/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
index b3f0bd1..487396d 100644
--- a/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
+++ b/contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/MongoTestSuit.java
@@ -20,9 +20,10 @@ package org.apache.drill.exec.store.mongo;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;
import com.google.common.collect.Lists;
@@ -94,7 +95,9 @@ public class MongoTestSuit implements MongoTestConstants {
configServers.add(crateConfigServerConfig(CONFIG_SERVER_3_PORT));
// creating replicaSets
- Map<String, List<IMongodConfig>> replicaSets = new HashMap<>();
+ // A LinkedHashMap ensures that the config servers are started first.
+ Map<String, List<IMongodConfig>> replicaSets = new LinkedHashMap<>();
+
List<IMongodConfig> replicaSet1 = new ArrayList<>();
replicaSet1.add(crateIMongodConfig(MONGOD_1_PORT, false,
REPLICA_SET_1_NAME));
@@ -102,7 +105,6 @@ public class MongoTestSuit implements MongoTestConstants {
REPLICA_SET_1_NAME));
replicaSet1.add(crateIMongodConfig(MONGOD_3_PORT, false,
REPLICA_SET_1_NAME));
- replicaSets.put(REPLICA_SET_1_NAME, replicaSet1);
List<IMongodConfig> replicaSet2 = new ArrayList<>();
replicaSet2.add(crateIMongodConfig(MONGOD_4_PORT, false,
REPLICA_SET_2_NAME));
@@ -110,8 +112,10 @@ public class MongoTestSuit implements MongoTestConstants {
REPLICA_SET_2_NAME));
replicaSet2.add(crateIMongodConfig(MONGOD_6_PORT, false,
REPLICA_SET_2_NAME));
- replicaSets.put(REPLICA_SET_2_NAME, replicaSet2);
+
replicaSets.put(CONFIG_REPLICA_SET, configServers);
+ replicaSets.put(REPLICA_SET_1_NAME, replicaSet1);
+ replicaSets.put(REPLICA_SET_2_NAME, replicaSet2);
// create mongos
IMongosConfig mongosConfig = createIMongosConfig();
--
To stop receiving notification emails like this one, please contact
volodymyr@apache.org.