seqeron
0.18.0
Loading...
Searching...
No Matches
ClusterError.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
namespace
org::limitless::seqeron::app
{
6
7
// Why a producer may no longer act. Each is terminal and latched: the façade releases its cluster session
8
// so a standby can take over, rather than carrying on behind a view of the log it cannot trust. The Java
9
// twin is app/ClusterError.java; keep the two in step.
10
enum class
ClusterError
: std::uint8_t
11
{
12
// The cluster closed this session, or a new leader never arrived, on a gateway instance that had announced its
13
// activation on it; or no new session replaced it in time on any other. This instance can never be promoted
14
// again.
15
ClusterSessionLost
,
16
// An own frame came back differing from the oldest pending one, so what reached the log cannot be counted.
17
IngressConfirmFaulted
,
18
// Recovery has dispatched nothing for the deadline, on an instance that had caught up before; only a designated
19
// gateway instance or the leader's replica fences, any other logs it.
20
RecoveryStalled
,
21
// No ClusterHeartbeat for the deadline: this process has stopped seeing its node's queue. Fences as RecoveryStalled
22
// does.
23
QueueStalled
,
24
// This instance's snapshot of a round differs from its source's sequenced one: its state is not the log's (A-7).
25
SnapshotDiverged
,
26
// This instance's source has a snapshot it cannot restore: a format or header version this build does not
27
// read, or records that fail the check the Replayer indexed them by.
28
SnapshotUnrestorable
,
29
// A group this instance addresses is not in the log's group table (A-9).
30
GroupUnknown
,
31
// A hosted client broke the host protocol, for instance by opening a connection under an id the façade did not
32
// allocate.
33
ClientProtocol
,
34
};
35
42
inline
const
char
*
clusterErrorName
(
const
ClusterError
error)
43
{
44
switch
(error)
45
{
46
case
ClusterError::ClusterSessionLost
:
47
return
"CLUSTER_SESSION_LOST"
;
48
case
ClusterError::IngressConfirmFaulted
:
49
return
"INGRESS_CONFIRM_FAULTED"
;
50
case
ClusterError::RecoveryStalled
:
51
return
"RECOVERY_STALLED"
;
52
case
ClusterError::QueueStalled
:
53
return
"QUEUE_STALLED"
;
54
case
ClusterError::SnapshotDiverged
:
55
return
"SNAPSHOT_DIVERGED"
;
56
case
ClusterError::SnapshotUnrestorable
:
57
return
"SNAPSHOT_UNRESTORABLE"
;
58
case
ClusterError::GroupUnknown
:
59
return
"GROUP_UNKNOWN"
;
60
case
ClusterError::ClientProtocol
:
61
return
"CLIENT_PROTOCOL"
;
62
}
63
return
"UNKNOWN"
;
64
}
65
66
}
// namespace org::limitless::seqeron::app
org::limitless::seqeron::app
Definition
ClusterError.hpp:5
org::limitless::seqeron::app::ClusterError
ClusterError
Definition
ClusterError.hpp:11
org::limitless::seqeron::app::ClusterError::SnapshotUnrestorable
@ SnapshotUnrestorable
org::limitless::seqeron::app::ClusterError::QueueStalled
@ QueueStalled
org::limitless::seqeron::app::ClusterError::IngressConfirmFaulted
@ IngressConfirmFaulted
org::limitless::seqeron::app::ClusterError::SnapshotDiverged
@ SnapshotDiverged
org::limitless::seqeron::app::ClusterError::GroupUnknown
@ GroupUnknown
org::limitless::seqeron::app::ClusterError::ClusterSessionLost
@ ClusterSessionLost
org::limitless::seqeron::app::ClusterError::ClientProtocol
@ ClientProtocol
org::limitless::seqeron::app::ClusterError::RecoveryStalled
@ RecoveryStalled
org::limitless::seqeron::app::clusterErrorName
const char * clusterErrorName(const ClusterError error)
The error's name, for a log line.
Definition
ClusterError.hpp:42
org
limitless
seqeron
app
ClusterError.hpp
Generated by
1.9.8