Skip to content

Commit

Permalink
Add null check for backward compatibility/upgrade situations
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Dec 8, 2017
1 parent 92eb2f1 commit 43f65e2
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -128,7 +128,8 @@ protected void checkSymDbOwnership() {
if (!isClusteringEnabled()) {
List<NodeHost> nodeHosts = nodeService.findNodeHosts(nodeService.findIdentityNodeId());
for (NodeHost nodeHost : nodeHosts) {
if (!StringUtils.equals(instanceId, nodeHost.getInstanceId())) {
if (nodeHost.getInstanceId() != null
&& !StringUtils.equals(instanceId, nodeHost.getInstanceId())) {
String msg = String.format("*** Node '%s' failed to claim exclusive ownership of the SymmetricDS database. *** "
+ "This is instance id '%s' but instance id '%s' is already present in sym_node_host. This is caused when 2 copies of SymmetricDS "
+ "are pointed at the same database, but not clustered. If you are configuring a cluster, set cluster.lock.enabled=true and restart. "
Expand Down

0 comments on commit 43f65e2

Please sign in to comment.