Skip to content

Commit

Permalink
fix missing check for empty deployment id (dotnet#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt authored and sergeybykov committed Mar 17, 2017
1 parent 939a3b6 commit f19f887
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 @@ -130,9 +130,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 f19f887

Please sign in to comment.