@@ -69,100 +69,15 @@ internal struct ClusterShellState: ReadOnlyClusterState {
6969 get {
7070 self . _latestGossip
7171 }
72- // ---------------------
73- /*
74- Captured log [third][2020-01-23 1:59:18.8820] [ConvergentGossip.swift:88][/system/cluster/gossip] [trace] Received gossip: GossipEnvelope(payload: DistributedActors.Cluster.Gossip(owner: sact://first:671878924@localhost:9001, seen: Cluster.Gossip.SeenTable(
75- sact://first@localhost:9001 observed versions:
76- uniqueNode:sact://first@localhost:9001 @ 8
77- uniqueNode:sact://third@localhost:9003 @ 6
78- sact://third@localhost:9003 observed versions:
79- uniqueNode:sact://first@localhost:9001 @ 7
80- uniqueNode:sact://third@localhost:9003 @ 6
81- ), membership: Membership(count: 2, leader: [Member(sact://first@localhost:9001, status: up, reachability: reachable)], members: [Member(sact://third:2926310932@localhost:9003, status: up, reachability: reachable, upNumber: 1), Member(sact://first:671878924@localhost:9001, status: up, reachability: reachable, upNumber: 1)])))
82- // metadata:
83- // "actor/message": GossipEnvelope(payload: DistributedActors.Cluster.Gossip(owner: sact://first:671878924@localhost:9001, seen: Cluster.Gossip.SeenTable(
84- // sact://first@localhost:9001 observed versions:
85- // uniqueNode:sact://first@localhost:9001 @ 8
86- // uniqueNode:sact://third@localhost:9003 @ 6
87- // sact://third@localhost:9003 observed versions:
88- // uniqueNode:sact://first@localhost:9001 @ 7
89- // uniqueNode:sact://third@localhost:9003 @ 6
90- // ), membership: Membership(count: 2, leader: [Member(sact://first@localhost:9001, status: up, reachability: reachable)], members: [Member(sact://third:2926310932@localhost:9003, status: up, reachability: reachable, upNumber: 1), Member(sact://first:671878924@localhost:9001, status: up, reachability: reachable, upNumber: 1)])))
91- // "gossip/localPayload": Optional(DistributedActors.Cluster.Gossip(owner: sact://third:2926310932@localhost:9003, seen: Cluster.Gossip.SeenTable(
92- // sact://first@localhost:9001 observed versions:
93- // uniqueNode:sact://first@localhost:9001 @ 7
94- // uniqueNode:sact://second@localhost:9002 @ 5
95- // uniqueNode:sact://third@localhost:9003 @ 6
96- // sact://second@localhost:9002 observed versions:
97- // uniqueNode:sact://first@localhost:9001 @ 5
98- // uniqueNode:sact://second@localhost:9002 @ 5
99- // uniqueNode:sact://third@localhost:9003 @ 6
100- // sact://third@localhost:9003 observed versions:
101- // uniqueNode:sact://first@localhost:9001 @ 7
102- // uniqueNode:sact://second@localhost:9002 @ 5
103- // uniqueNode:sact://third@localhost:9003 @ 6
104- // ), membership: Membership(count: 3, leader: [Member(sact://first@localhost:9001, status: up, reachability: reachable)], members: [Member(sact://third:2926310932@localhost:9003, status: up, reachability: reachable), Member(sact://first:671878924@localhost:9001, status: up, reachability: reachable), Member(sact://second:1339064558@localhost:9002, status: down, reachability: reachable)])))
105- Captured log [third][2020-01-23 1:59:18.8820] [ClusterShellState.swift:74][/system/cluster] [info] KEEP VERSION >>> Optional([uniqueNode:sact://first@localhost:9001: 8, uniqueNode:sact://third@localhost:9003: 6, uniqueNode:sact://second@localhost:9002: 5])
106- NOW: Gossip(owner: sact://third:2926310932@localhost:9003, seen: Cluster.Gossip.SeenTable(
107- sact://first@localhost:9001 observed versions:
108- uniqueNode:sact://first@localhost:9001 @ 7
109- uniqueNode:sact://second@localhost:9002 @ 5
110- uniqueNode:sact://third@localhost:9003 @ 6
111- sact://second@localhost:9002 observed versions:
112- uniqueNode:sact://first@localhost:9001 @ 5
113- uniqueNode:sact://second@localhost:9002 @ 5
114- uniqueNode:sact://third@localhost:9003 @ 6
115- sact://third@localhost:9003 observed versions:
116- uniqueNode:sact://first@localhost:9001 @ 7
117- uniqueNode:sact://second@localhost:9002 @ 5
118- uniqueNode:sact://third@localhost:9003 @ 6
119- ), membership: Membership(count: 3, leader: [Member(sact://first@localhost:9001, status: up, reachability: reachable)], members: [Member(sact://third:2926310932@localhost:9003, status: up, reachability: reachable), Member(sact://first:671878924@localhost:9001, status: up, reachability: reachable), Member(sact://second:1339064558@localhost:9002, status: down, reachability: reachable)]))
120- NEW: Gossip(owner: sact://third:2926310932@localhost:9003, seen: Cluster.Gossip.SeenTable(
121- sact://first@localhost:9001 observed versions:
122- uniqueNode:sact://first@localhost:9001 @ 8
123- uniqueNode:sact://second@localhost:9002 @ 5
124- uniqueNode:sact://third@localhost:9003 @ 6
125- sact://second@localhost:9002 observed versions:
126- uniqueNode:sact://first@localhost:9001 @ 5
127- uniqueNode:sact://second@localhost:9002 @ 5
128- uniqueNode:sact://third@localhost:9003 @ 6
129- sact://third@localhost:9003 observed versions:
130- uniqueNode:sact://first@localhost:9001 @ 8
131- uniqueNode:sact://second@localhost:9002 @ 5
132- uniqueNode:sact://third@localhost:9003 @ 6
133- ), membership: Membership(count: 3, leader: [Member(sact://first@localhost:9001, status: up, reachability: reachable)], members: [Member(sact://third:2926310932@localhost:9003, status: up, reachability: reachable), Member(sact://first:671878924@localhost:9001, status: up, reachability: reachable), Member(sact://second:1339064558@localhost:9002, status: down, reachability: reachable)]))
134-
135- UPON a removed gossip we must remove as well, and not bring it back on third magically
136- */
137- // ---------------------
138-
13972 set {
14073 if self . _latestGossip. membership == newValue. membership {
141- // self.log.info("""
142- // KEEP VERSION >>> \(newValue.seen.version(at: self.myselfNode))
143- // NOW: \(self._latestGossip)
144- // NEW: \(newValue)
145- // """)
14674 self . _latestGossip = newValue
14775 } else {
148- precondition ( " \( self . _latestGossip. membership) " != " \( newValue. membership) " , " WHY! ARE THOSE EQUAL: \( reflecting: self . _latestGossip. membership) ||||| \( reflecting: newValue. membership) " )
14976 let next : Cluster . Gossip
15077 if self . _latestGossip. version == newValue. version {
15178 next = newValue. incrementingOwnerVersion ( )
152- // self.log.info("""
153- // BUMP VERSION >>> \(self._latestGossip.version) >>>> \(next.version)
154- // NOW: \(self._latestGossip)
155- // NEW: \(newValue)
156- // RES: \(next)
157- // """)
15879 } else {
15980 next = newValue
160- // self.log.info("""
161- // ACK VERSION >>> \(self._latestGossip.version) >>>> \(next.version)
162- // NOW: \(self._latestGossip)
163- // NEW: \(newValue)
164- // RES: \(next)
165- // """)
16681 }
16782
16883 self . _latestGossip = next
0 commit comments