Skip to content

Commit

Permalink
fix missing check for empty deployment id (#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt authored and sergeybykov committed Mar 1, 2017
1 parent 8556ce1 commit 7ba1072
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/OrleansRuntime/Silo/Silo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,14 @@ public bool HasMultiClusterNetwork
/// <summary> Get the id of the cluster this silo is part of. </summary>
public string ClusterId
{
get { return GlobalConfig.HasMultiClusterNetwork ? GlobalConfig.ClusterId : GlobalConfig.DeploymentId; }
get {
var configuredId = GlobalConfig.HasMultiClusterNetwork ? GlobalConfig.ClusterId : GlobalConfig.DeploymentId;
return string.IsNullOrEmpty(configuredId) ? CLUSTER_ID_DEFAULT : configuredId;
}
}

private const string CLUSTER_ID_DEFAULT = "DefaultClusterID"; // if no id is configured, we pick a nonempty default.

/// <summary> SiloAddress for this silo. </summary>
public SiloAddress SiloAddress => this.initializationParams.SiloAddress;

Expand Down

0 comments on commit 7ba1072

Please sign in to comment.