This is an automated email from the ASF dual-hosted git repository.

dcapwell pushed a commit to branch cep-15-accord
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cep-15-accord by this push:
     new 8834ec8df2 Revert "Ninja: When starting up AccordService set the 
instance before startup to avoid an edge case when doing node restart and 
replying topology history"
8834ec8df2 is described below

commit 8834ec8df26b2ac69df86d6a90d08b7879aeee4d
Author: David Capwell <dcapw...@apache.org>
AuthorDate: Thu Oct 3 22:43:55 2024 -0700

    Revert "Ninja: When starting up AccordService set the instance before 
startup to avoid an edge case when doing node restart and replying topology 
history"
    
    This reverts commit 58789ef29c6222744c46ec4ba9a8ae7b8e664d16.
---
 .../cassandra/service/accord/AccordService.java    | 25 +++++++---------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/src/java/org/apache/cassandra/service/accord/AccordService.java 
b/src/java/org/apache/cassandra/service/accord/AccordService.java
index 8d0fe78a71..6fdf9e8586 100644
--- a/src/java/org/apache/cassandra/service/accord/AccordService.java
+++ b/src/java/org/apache/cassandra/service/accord/AccordService.java
@@ -359,25 +359,16 @@ public class AccordService implements IAccordService, 
Shutdownable
             return;
         }
         AccordService as = new 
AccordService(AccordTopology.tcmIdToAccord(tcmId));
-        // Set the instance early as there is an edge case on startup where we 
reply topology history, and AccordConfigurationService reaches out to 
AccordService.instance
-        instance = as;
-        try
+        as.startup();
+        if (StorageService.instance.isReplacingSameAddress())
         {
-            as.startup();
-            if (StorageService.instance.isReplacingSameAddress())
-            {
-                // when replacing another node but using the same ip the 
hostId will also match, this causes no TCM transactions
-                // to be committed...
-                // In order to bootup correctly, need to pull in the current 
epoch
-                ClusterMetadata current = ClusterMetadata.current();
-                as.configurationService().notifyPostCommit(current, current, 
false);
-            }
-        }
-        catch (Throwable t)
-        {
-            instance = null;
-            throw t;
+            // when replacing another node but using the same ip the hostId 
will also match, this causes no TCM transactions
+            // to be committed...
+            // In order to bootup correctly, need to pull in the current epoch
+            ClusterMetadata current = ClusterMetadata.current();
+            as.configurationService().notifyPostCommit(current, current, 
false);
         }
+        instance = as;
 
         as.journal().replay();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to