From 06849279f1c1ec9466b57be1a8d1bc81bfe679a6 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sat, 8 Jun 2024 10:10:49 -0700 Subject: [PATCH] add vibe check to CHILLIN --- .../java/com/salesforce/apollo/choam/ViewAssembly.java | 8 ++++++++ .../com/salesforce/apollo/choam/fsm/Reconfiguration.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java index b68893c8b..238f92f46 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/ViewAssembly.java @@ -429,6 +429,7 @@ public void checkViews() { @Override public void chill() { + countdown.set(-1); if (ViewAssembly.this.checkAssembly()) { transitions.certified(); } else { @@ -456,5 +457,12 @@ public void finish() { public void publishViews() { propose(); } + + @Override + public void vibeCheck() { + if (ViewAssembly.this.checkAssembly()) { + transitions.certified(); + } + } } } diff --git a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java index 246daa51a..c76a2492d 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Reconfiguration.java @@ -29,6 +29,8 @@ public interface Reconfiguration { void publishViews(); + void vibeCheck(); + enum Reconfigure implements Transitions { AWAIT_ASSEMBLY { // Publish the Views of this node @@ -96,6 +98,12 @@ public Transitions certified() { return CERTIFICATION; } + @Override + public Transitions checkAssembly() { + context().vibeCheck(); + return null; + } + // Check to see if we already have a full complement of committee Joins @Entry public void chillin() {