This is an automated email from the ASF dual-hosted git repository.
ifesdjeen 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 f04852ced8 Prevent CommandStore shutdown exceptions on messages that
come during shutdown
f04852ced8 is described below
commit f04852ced81ffdf296b1cd995b3d051ae972c909
Author: Alex Petrov <[email protected]>
AuthorDate: Tue Oct 15 17:32:30 2024 +0200
Prevent CommandStore shutdown exceptions on messages that come during
shutdown
---
src/java/org/apache/cassandra/service/accord/AccordService.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/cassandra/service/accord/AccordService.java
b/src/java/org/apache/cassandra/service/accord/AccordService.java
index a080e93d14..b0b7edf71a 100644
--- a/src/java/org/apache/cassandra/service/accord/AccordService.java
+++ b/src/java/org/apache/cassandra/service/accord/AccordService.java
@@ -186,7 +186,7 @@ public class AccordService implements IAccordService,
Shutdownable
{
private static final Logger logger =
LoggerFactory.getLogger(AccordService.class);
- private enum State {INIT, STARTED, SHUTDOWN}
+ private enum State {INIT, STARTED, SHUTTING_DOWN, SHUTDOWN}
private static final Future<Void> BOOTSTRAP_SUCCESS =
ImmediateFuture.success(null);
@@ -399,6 +399,7 @@ public class AccordService implements IAccordService,
Shutdownable
{
return state == State.STARTED && journal.started();
}
+
public static IAccordService instance()
{
if (!DatabaseDescriptor.getAccordTransactionsEnabled())
@@ -987,6 +988,7 @@ public class AccordService implements IAccordService,
Shutdownable
{
if (state != State.STARTED)
return;
+ state = State.SHUTTING_DOWN;
shutdownAndWait(1, TimeUnit.MINUTES);
state = State.SHUTDOWN;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]