-
Nodes A and B fully in the cluster
-
Local state before (1):
{:pairs {:a :b, :b :a}}
-
C and D want to join
-
C sends
prepare-join-cluster
(1) -
D sends
prepare-join-cluster
(2) -
A, B, C, and D play the log
-
B encounters (1)
- Pre:
{:pairs {:a :b, :b :a}}
- Post:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- determines B will attach to C. Records this in the local state.
- adds watch to C
- sends
notify-join-cluster
(3)
- Pre:
-
A, C, and D encounter (1)
- Pre:
{:pairs {:a :b, :b :a}}
- Post:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- determines B will attach to C. Records this in the local state.
- no reactions
- Pre:
-
A, B, C, D encounter (2)
- Pre:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- Post:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- determines D cannot attach to any nodes. Aborts.
- D sends
abort-join-cluster
to the log, optionally tries to join again later - no reactions
- Pre:
-
C encounters (3)
- Pre:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- Post:
{:pairs {:a :b, :b :a} :accepted {:b :c}}
- adds a watch to A
- sends
accept-join-cluster
(4)
- Pre:
-
A and B encounter (3)
- Pre:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- Post:
{:pairs {:a :b, :b :a} :accepted {:b :c}}
- ignore
- Pre:
-
B encounters (4)
- Pre:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- Post:
{:pairs {:a :c, :b :c, :c :a}}
- B drops its watch form A
- Pre:
-
A and C encounter (4)
- Pre:
{:pairs {:a :b, :b :a} :prepared {:b :c}}
- Post:
{:pairs {:a :c, :b :c, :c :a}}
- C flushes its outbox
- ignore
- Pre:
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.