From 53c87cdb92dbd0422066dd072c597964a3633f30 Mon Sep 17 00:00:00 2001 From: John Spray Date: Sun, 7 Jan 2024 20:13:27 +0000 Subject: [PATCH] wip persistence --- control_plane/attachment_service/src/persistence.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 control_plane/attachment_service/src/persistence.rs diff --git a/control_plane/attachment_service/src/persistence.rs b/control_plane/attachment_service/src/persistence.rs new file mode 100644 index 0000000000..870b784479 --- /dev/null +++ b/control_plane/attachment_service/src/persistence.rs @@ -0,0 +1,13 @@ +/// The attachment service does not store most of its state durably. +/// +/// The essential things to store durably are: +/// - generation numbers, as these must always advance monotonically to ensure data safety. +/// - PlacementPolicy and TenantConfig, as these are set externally. +struct Persistence {} + +/// Parts of TenantState that are stored durably +struct TenantPersistence { + pub(crate) generation: Generation, + pub(crate) policy: PlacementPolicy, + pub(crate) config: TenantConfig, +}