Skip to content

Commit e6a40ec

Browse files
committed
Distributed: Fixed issue on restart node
1 parent 857af74 commit e6a40ec

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/paginated/OLocalPaginatedStorage.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.orientechnologies.common.io.OIOUtils;
2424
import com.orientechnologies.common.log.OLogManager;
2525
import com.orientechnologies.common.parser.OSystemVariableResolver;
26-
import com.orientechnologies.common.util.OArrays;
2726
import com.orientechnologies.orient.core.Orient;
2827
import com.orientechnologies.orient.core.command.OCommandOutputListener;
2928
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
@@ -81,11 +80,18 @@
8180
import java.util.Comparator;
8281
import java.util.HashMap;
8382
import java.util.HashSet;
84-
import java.util.LinkedHashMap;
8583
import java.util.List;
8684
import java.util.Map;
8785
import java.util.Set;
88-
import java.util.concurrent.*;
86+
import java.util.concurrent.Callable;
87+
import java.util.concurrent.ConcurrentHashMap;
88+
import java.util.concurrent.ConcurrentMap;
89+
import java.util.concurrent.CopyOnWriteArrayList;
90+
import java.util.concurrent.ExecutorService;
91+
import java.util.concurrent.Executors;
92+
import java.util.concurrent.ScheduledExecutorService;
93+
import java.util.concurrent.ThreadFactory;
94+
import java.util.concurrent.TimeUnit;
8995

9096
/**
9197
* @author Andrey Lomakin
@@ -1739,7 +1745,7 @@ public int compare(ODirtyPage pageOne, ODirtyPage pageTwo) {
17391745
}
17401746

17411747
private void restoreFromBegging() throws IOException {
1742-
OLogManager.instance().info(this, "Date restore procedure is started.");
1748+
OLogManager.instance().info(this, "Data restore procedure is started.");
17431749
OLogSequenceNumber lsn = writeAheadLog.begin();
17441750

17451751
restoreFrom(lsn);

server/src/main/java/com/orientechnologies/orient/server/distributed/ODistributedConfiguration.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,16 @@ public ODocument getClusterConfiguration(String iClusterName) {
343343
if (iClusterName == null)
344344
iClusterName = "*";
345345

346-
ODocument cfg = clusters.field(iClusterName);
347-
if (cfg == null && !iClusterName.equals("*"))
348-
// GET DEFAULT CLUSTER
346+
final ODocument cfg;
347+
if (!clusters.containsField(iClusterName))
348+
// NO CLUSTER IN CFG: GET THE DEFAULT ONE
349349
cfg = clusters.field("*");
350+
else
351+
// GET THE CLUSTER CFG
352+
cfg = clusters.field(iClusterName);
353+
354+
if( cfg == null )
355+
return new ODocument();
350356

351357
return cfg;
352358
}

0 commit comments

Comments
 (0)