From 61ebde0be2a6ae11c51b0a944f731eb776b65565 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Sun, 27 Oct 2024 14:24:29 +0000 Subject: [PATCH] doc/dev/crimson: Add initial BackfillMachine docs Signed-off-by: Matan Breizman --- doc/dev/crimson/backfillmachine.rst | 24 ++++ doc/dev/crimson/crimson_backfillmachine.svg | 135 ++++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 doc/dev/crimson/backfillmachine.rst create mode 100644 doc/dev/crimson/crimson_backfillmachine.svg diff --git a/doc/dev/crimson/backfillmachine.rst b/doc/dev/crimson/backfillmachine.rst new file mode 100644 index 00000000000..c42bb32bbfa --- /dev/null +++ b/doc/dev/crimson/backfillmachine.rst @@ -0,0 +1,24 @@ +=============== +BackfillMachine +=============== + + +In Crimson, Backfill is implemented with `Boost State Chart `_. + +.. //TODO: Once the implementation is settled: +.. * Explain exceptional states once we finish working on this code +.. * Explain example happy path flow (code walkthorugh?) +.. * https://tracker.ceph.com/issues/68728 + +A sample of the recent state model: + +.. note:: ``Cancelled`` and ``Crushed`` states are not included in the + following graph in order to make it easier to follow: + * **Any** state is able to transit into ``Crushed``. + * **Any** state (except from ``Initial`` and ``Waiting``) can transit into ``Cancelled`` + +.. image:: crimson_backfillmachine.svg + + +In similarly to :doc:`/dev/peering` a copy of the latest BackfillMachine +state model can be genereated using the `gen_state_diagram.py `_ diff --git a/doc/dev/crimson/crimson_backfillmachine.svg b/doc/dev/crimson/crimson_backfillmachine.svg new file mode 100644 index 00000000000..4530c2295be --- /dev/null +++ b/doc/dev/crimson/crimson_backfillmachine.svg @@ -0,0 +1,135 @@ + + + + + + +G + + +cluster0 + +BackfillMachine + + + +Initial + + + + + +Initial + + + +Enqueuing + +Enqueuing + + + +Initial->Enqueuing + + +transit + + + +Done + +Done + + + +Initial->Done + + +transit + + + +PrimaryScanning + +PrimaryScanning + + + +Enqueuing->PrimaryScanning + + +RequestPrimaryScanning + + + +ReplicasScanning + +ReplicasScanning + + + +Enqueuing->ReplicasScanning + + +RequestReplicasScanning + + + +Waiting + +Waiting + + + +Enqueuing->Waiting + + +RequestWaiting + + + +Enqueuing->Done + + +RequestDone + + + +PrimaryScanning->Enqueuing + + +transit + + + +PrimaryScanning->Done + + +RequestDone + + + +ReplicasScanning->Enqueuing + + +transit + + + +ReplicasScanning->Done + + +RequestDone + + + +Waiting->Done + + +RequestDone + + + -- 2.39.5