From 889e7d5e4d33843fea38fce56dfe5281cee1b49a Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Tue, 11 Jun 2024 07:48:03 -0700 Subject: [PATCH] prevent state transition errors on failure --- .../com/salesforce/apollo/choam/CHOAM.java | 4 +- .../salesforce/apollo/choam/fsm/Combine.java | 65 +++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java b/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java index c50ed31b1..6c30b9780 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java @@ -361,11 +361,11 @@ public void stop() { } session.cancelAll(); try { - linear.shutdown(); + linear.shutdownNow(); } catch (Throwable e) { } try { - executions.shutdown(); + executions.shutdownNow(); } catch (Throwable e) { } final var c = current.get(); diff --git a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Combine.java b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Combine.java index 93dcbe4a1..788b0db61 100644 --- a/choam/src/main/java/com/salesforce/apollo/choam/fsm/Combine.java +++ b/choam/src/main/java/com/salesforce/apollo/choam/fsm/Combine.java @@ -110,6 +110,71 @@ public Transitions rotateViewKeys() { public void failIt() { context().fail(); } + + @Override + public Transitions beginCheckpoint() { + return null; + } + + @Override + public Transitions bootstrap(HashedCertifiedBlock anchor) { + return null; + } + + @Override + public Transitions combine() { + return null; + } + + @Override + public Transitions fail() { + return null; + } + + @Override + public Transitions finishCheckpoint() { + return null; + } + + @Override + public Transitions nextView() { + return null; + } + + @Override + public Transitions regenerate() { + return null; + } + + @Override + public Transitions regenerated() { + return null; + } + + @Override + public Transitions rotateViewKeys() { + return null; + } + + @Override + public Transitions start() { + return null; + } + + @Override + public Transitions synchd() { + return null; + } + + @Override + public Transitions synchronizationFailed() { + return null; + } + + @Override + public Transitions synchronizing() { + return null; + } }, RECOVERING { @Override public Transitions bootstrap(HashedCertifiedBlock anchor) {