Skip to content

Commit

Permalink
cleaned up Reachability
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Apr 20, 2021
1 parent 83c2205 commit f2f4bcf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/core/Akka.Cluster/Reachability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public enum ReachabilityStatus
public static readonly Reachability Empty =
new Reachability(ImmutableList.Create<Record>(), ImmutableDictionary.Create<UniqueAddress, long>());

//TODO: Serialization should ignore
private readonly Lazy<Cache> _cache;

/// <summary>
Expand All @@ -80,11 +79,6 @@ public Reachability(ImmutableList<Record> records, ImmutableDictionary<UniqueAdd
/// </summary>
public ImmutableDictionary<UniqueAddress, long> Versions { get; }

/*
* def isReachable(observer: UniqueAddress, subject: UniqueAddress): Boolean =
status(observer, subject) == Reachable
*/

/// <summary>
/// TBD
/// </summary>
Expand Down Expand Up @@ -223,6 +217,9 @@ public Reachability Merge(IImmutableSet<UniqueAddress> allowed, Reachability oth
var rows1 = ObserverRows(observer);
var rows2 = other.ObserverRows(observer);

if (rows1 == null && rows2 == null)
continue;

if (rows1 != null && rows2 != null)
{
var rows = observerVersion1 > observerVersion2 ? rows1 : rows2;
Expand Down

0 comments on commit f2f4bcf

Please sign in to comment.