DistributedApplications: replicated worker queue with inbox/outbox dedup, at-least-once retry, DLQ and consumer recovery (P-DISTRIBUTED-05)
This commit is contained in:
1 parent
23a899a892
commit
b386140899
6 files changed
+871
-18
No files matched your search
@@ -99,6 +99,12 @@ namespace DistributedHost
|
||||
[[nodiscard]] Void::Result::Result<std::optional<std::string>>
|
||||
quorum_read(std::string_view node, std::string_view key);
|
||||
|
||||
/// Quorum-confirmed copy of the leader's applied state. Used by
|
||||
/// compositions that must enumerate keys (e.g. the worker queue).
|
||||
[[nodiscard]] Void::Result::Result<
|
||||
std::map<std::string, std::string, std::less<>>>
|
||||
quorum_snapshot(std::string_view node);
|
||||
|
||||
/// Crash/restart keep the durable log, term and vote.
|
||||
void crash(std::string_view node);
|
||||
void restart(std::string_view node);
|
||||
@@ -137,6 +143,10 @@ namespace DistributedHost
|
||||
[[nodiscard]] static bool log_up_to_date(const Node& candidate,
|
||||
const Node& voter);
|
||||
void apply_committed(Node& node);
|
||||
/// Majority-confirm `node` as leader in its term, then apply pending
|
||||
/// committed entries. Shared by quorum reads and snapshots.
|
||||
[[nodiscard]] Void::Result::Result<void>
|
||||
confirm_leader(Node& node);
|
||||
/// Copy the leader's log to one reachable follower. False when the
|
||||
/// follower cannot be brought in line (e.g. it is in a newer term).
|
||||
[[nodiscard]] bool replicate_to(Node& leader, Node& follower);
|
||||
|
||||
Reference in new issue
Block a user