mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
doc/dev/crimson: Add initial BackfillMachine docs
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
parent
dbddf1256c
commit
61ebde0be2
24
doc/dev/crimson/backfillmachine.rst
Normal file
24
doc/dev/crimson/backfillmachine.rst
Normal file
@ -0,0 +1,24 @@
|
||||
===============
|
||||
BackfillMachine
|
||||
===============
|
||||
|
||||
|
||||
In Crimson, Backfill is implemented with `Boost State Chart <https://www.boost.org/doc/libs/1_86_0/libs/statechart/doc/>`_.
|
||||
|
||||
.. //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 <https://github.com/ceph/ceph/blob/master/doc/scripts/gen_state_diagram.py>`_
|
135
doc/dev/crimson/crimson_backfillmachine.svg
Normal file
135
doc/dev/crimson/crimson_backfillmachine.svg
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.44.0 (0)
|
||||
-->
|
||||
<!-- Title: G Pages: 1 -->
|
||||
<svg width="504pt" height="233pt"
|
||||
viewBox="0.00 0.00 504.00 232.62" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(0.65 0.65) rotate(0) translate(4 356)">
|
||||
<title>G</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-356 776,-356 776,4 -4,4"/>
|
||||
<g id="clust1" class="cluster">
|
||||
<title>cluster0</title>
|
||||
<polygon fill="none" stroke="black" points="8,-8 8,-344 764,-344 764,-8 8,-8"/>
|
||||
<text text-anchor="middle" x="386" y="-328.8" font-family="Times-Roman" font-size="14.00">BackfillMachine</text>
|
||||
</g>
|
||||
<!-- Initial -->
|
||||
<g id="node1" class="node">
|
||||
<title>Initial</title>
|
||||
<polygon fill="lightgrey" stroke="black" points="633,-313 582.39,-295 633,-277 683.61,-295 633,-313"/>
|
||||
<polyline fill="none" stroke="black" points="593.7,-299.02 593.7,-290.98 "/>
|
||||
<polyline fill="none" stroke="black" points="621.69,-281.02 644.31,-281.02 "/>
|
||||
<polyline fill="none" stroke="black" points="672.3,-290.98 672.3,-299.02 "/>
|
||||
<polyline fill="none" stroke="black" points="644.31,-308.98 621.69,-308.98 "/>
|
||||
<text text-anchor="middle" x="633" y="-291.3" font-family="Times-Roman" font-size="14.00">Initial</text>
|
||||
</g>
|
||||
<!-- Enqueuing -->
|
||||
<g id="node2" class="node">
|
||||
<title>Enqueuing</title>
|
||||
<ellipse fill="none" stroke="black" cx="419" cy="-208" rx="59.59" ry="18"/>
|
||||
<text text-anchor="middle" x="419" y="-204.3" font-family="Times-Roman" font-size="14.00">Enqueuing</text>
|
||||
</g>
|
||||
<!-- Initial->Enqueuing -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Initial->Enqueuing</title>
|
||||
<path fill="none" stroke="#1e90ff" d="M610.1,-284.9C575.14,-271.02 507.83,-244.28 463.16,-226.54"/>
|
||||
<polygon fill="#1e90ff" stroke="#1e90ff" points="464.3,-223.23 453.71,-222.79 461.71,-229.73 464.3,-223.23"/>
|
||||
<text text-anchor="middle" x="561" y="-247.8" font-family="Times-Roman" font-size="14.00" fill="#1e90ff">transit</text>
|
||||
</g>
|
||||
<!-- Done -->
|
||||
<g id="node6" class="node">
|
||||
<title>Done</title>
|
||||
<ellipse fill="none" stroke="black" cx="404" cy="-34" rx="34.39" ry="18"/>
|
||||
<text text-anchor="middle" x="404" y="-30.3" font-family="Times-Roman" font-size="14.00">Done</text>
|
||||
</g>
|
||||
<!-- Initial->Done -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Initial->Done</title>
|
||||
<path fill="none" stroke="#000000" d="M645.22,-280.85C674.04,-248.22 740.83,-161.92 700,-103 671.6,-62.02 523.64,-44.48 448.25,-38.11"/>
|
||||
<polygon fill="#000000" stroke="#000000" points="448.37,-34.61 438.12,-37.28 447.8,-41.58 448.37,-34.61"/>
|
||||
<text text-anchor="middle" x="735" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#000000">transit</text>
|
||||
</g>
|
||||
<!-- PrimaryScanning -->
|
||||
<g id="node3" class="node">
|
||||
<title>PrimaryScanning</title>
|
||||
<ellipse fill="none" stroke="black" cx="603" cy="-121" rx="87.99" ry="18"/>
|
||||
<text text-anchor="middle" x="603" y="-117.3" font-family="Times-Roman" font-size="14.00">PrimaryScanning</text>
|
||||
</g>
|
||||
<!-- Enqueuing->PrimaryScanning -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Enqueuing->PrimaryScanning</title>
|
||||
<path fill="none" stroke="#ffa500" d="M450.17,-192.63C462.72,-186.59 477.22,-179.28 490,-172 500.6,-165.96 502.14,-162.57 513,-157 524.77,-150.96 537.83,-145.32 550.27,-140.4"/>
|
||||
<polygon fill="#ffa500" stroke="#ffa500" points="551.56,-143.66 559.63,-136.79 549.04,-137.12 551.56,-143.66"/>
|
||||
<text text-anchor="middle" x="600.5" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#ffa500">RequestPrimaryScanning</text>
|
||||
</g>
|
||||
<!-- ReplicasScanning -->
|
||||
<g id="node4" class="node">
|
||||
<title>ReplicasScanning</title>
|
||||
<ellipse fill="none" stroke="black" cx="278" cy="-121" rx="89.88" ry="18"/>
|
||||
<text text-anchor="middle" x="278" y="-117.3" font-family="Times-Roman" font-size="14.00">ReplicasScanning</text>
|
||||
</g>
|
||||
<!-- Enqueuing->ReplicasScanning -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Enqueuing->ReplicasScanning</title>
|
||||
<path fill="none" stroke="#40e0d0" d="M359.03,-207.52C291.51,-206.67 187.92,-200.56 163,-172 146.8,-153.43 167.41,-141.51 195.45,-133.98"/>
|
||||
<polygon fill="#40e0d0" stroke="#40e0d0" points="196.32,-137.37 205.2,-131.6 194.65,-130.57 196.32,-137.37"/>
|
||||
<text text-anchor="middle" x="252" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#40e0d0">RequestReplicasScanning</text>
|
||||
</g>
|
||||
<!-- Waiting -->
|
||||
<g id="node5" class="node">
|
||||
<title>Waiting</title>
|
||||
<ellipse fill="none" stroke="black" cx="93" cy="-121" rx="44.39" ry="18"/>
|
||||
<text text-anchor="middle" x="93" y="-117.3" font-family="Times-Roman" font-size="14.00">Waiting</text>
|
||||
</g>
|
||||
<!-- Enqueuing->Waiting -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>Enqueuing->Waiting</title>
|
||||
<path fill="none" stroke="#c71585" d="M359.66,-205.76C259.29,-203.03 64.81,-194.84 44,-172 34.37,-161.43 43.93,-150.03 57.08,-140.78"/>
|
||||
<polygon fill="#c71585" stroke="#c71585" points="59.06,-143.67 65.59,-135.32 55.28,-137.77 59.06,-143.67"/>
|
||||
<text text-anchor="middle" x="98.5" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#c71585">RequestWaiting</text>
|
||||
</g>
|
||||
<!-- Enqueuing->Done -->
|
||||
<g id="edge8" class="edge">
|
||||
<title>Enqueuing->Done</title>
|
||||
<path fill="none" stroke="#8dff33" d="M417.49,-189.95C416.27,-176.2 414.52,-156.36 413,-139 410.73,-113.02 408.17,-83.38 406.36,-62.41"/>
|
||||
<polygon fill="#8dff33" stroke="#8dff33" points="409.83,-61.96 405.49,-52.3 402.86,-62.56 409.83,-61.96"/>
|
||||
<text text-anchor="middle" x="459.5" y="-117.3" font-family="Times-Roman" font-size="14.00" fill="#8dff33">RequestDone</text>
|
||||
</g>
|
||||
<!-- PrimaryScanning->Enqueuing -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>PrimaryScanning->Enqueuing</title>
|
||||
<path fill="none" stroke="#ff0000" d="M539.02,-133.38C498.29,-141.09 451.78,-150.94 444,-157 436.44,-162.89 430.99,-171.69 427.15,-180.26"/>
|
||||
<polygon fill="#ff0000" stroke="#ff0000" points="423.84,-179.1 423.47,-189.69 430.36,-181.65 423.84,-179.1"/>
|
||||
<text text-anchor="middle" x="467" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#ff0000">transit</text>
|
||||
</g>
|
||||
<!-- PrimaryScanning->Done -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>PrimaryScanning->Done</title>
|
||||
<path fill="none" stroke="#ab00d5" d="M566.5,-104.41C530.3,-88.95 475.19,-65.41 439.38,-50.11"/>
|
||||
<polygon fill="#ab00d5" stroke="#ab00d5" points="440.39,-46.74 429.82,-46.03 437.64,-53.18 440.39,-46.74"/>
|
||||
<text text-anchor="middle" x="561.5" y="-73.8" font-family="Times-Roman" font-size="14.00" fill="#ab00d5">RequestDone</text>
|
||||
</g>
|
||||
<!-- ReplicasScanning->Enqueuing -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>ReplicasScanning->Enqueuing</title>
|
||||
<path fill="none" stroke="#0000ff" d="M310.1,-137.84C321.29,-143.6 333.84,-150.34 345,-157 349.43,-159.64 369.29,-173.07 387.32,-185.35"/>
|
||||
<polygon fill="#0000ff" stroke="#0000ff" points="385.71,-188.49 395.94,-191.23 389.65,-182.71 385.71,-188.49"/>
|
||||
<text text-anchor="middle" x="389" y="-160.8" font-family="Times-Roman" font-size="14.00" fill="#0000ff">transit</text>
|
||||
</g>
|
||||
<!-- ReplicasScanning->Done -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>ReplicasScanning->Done</title>
|
||||
<path fill="none" stroke="#000000" d="M284.08,-102.62C288.62,-91.9 295.82,-78.61 306,-70 321.79,-56.66 343.05,-48.25 361.73,-43.03"/>
|
||||
<polygon fill="#000000" stroke="#000000" points="362.69,-46.4 371.5,-40.51 360.94,-39.62 362.69,-46.4"/>
|
||||
<text text-anchor="middle" x="352.5" y="-73.8" font-family="Times-Roman" font-size="14.00" fill="#000000">RequestDone</text>
|
||||
</g>
|
||||
<!-- Waiting->Done -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>Waiting->Done</title>
|
||||
<path fill="none" stroke="#1e90ff" d="M117.15,-105.82C137.52,-94.47 167.79,-79.02 196,-70 251.1,-52.39 317.41,-43.19 360.1,-38.72"/>
|
||||
<polygon fill="#1e90ff" stroke="#1e90ff" points="360.56,-42.19 370.16,-37.71 359.86,-35.23 360.56,-42.19"/>
|
||||
<text text-anchor="middle" x="242.5" y="-73.8" font-family="Times-Roman" font-size="14.00" fill="#1e90ff">RequestDone</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.9 KiB |
Loading…
Reference in New Issue
Block a user