[pbs-devel] [PATCH v3 proxmox-backup 54/58] client: pxar: add flow chart for metadata change detection
Christian Ebner
c.ebner at proxmox.com
Thu Mar 28 13:37:03 CET 2024
A high level flow chart describing the logic used for the metadata
based file change detection mode.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 2:
- not present in previous version
...ow-chart-metadata-based-file-change-detection.svg | 1 +
...ow-chart-metadata-based-file-change-detection.txt | 12 ++++++++++++
2 files changed, 13 insertions(+)
create mode 100644 pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.svg
create mode 100644 pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.txt
diff --git a/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.svg b/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.svg
new file mode 100644
index 000000000..5e6df4815
--- /dev/null
+++ b/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.svg
@@ -0,0 +1 @@
+<svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="-8 -8 1339.7958984375 620" style="max-width: 100%;" xmlns="http://www.w3.org/2000/svg" width="100%" id="graph-div" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><style>@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");'</style><style>#graph-div{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#graph-div .error-icon{fill:#552222;}#graph-div .error-text{fill:#552222;stroke:#552222;}#graph-div .edge-thickness-normal{stroke-width:2px;}#graph-div .edge-thickness-thick{stroke-width:3.5px;}#graph-div .edge-pattern-solid{stroke-dasharray:0;}#graph-div .edge-pattern-dashed{stroke-dasharray:3;}#graph-div .edge-pattern-dotted{stroke-dasharray:2;}#graph-div .marker{fill:#333333;stroke:#333333;}#graph-div .marker.cross{stroke:#333333;}#graph-div svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#graph-div .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#graph-div .cluster-label text{fill:#333;}#graph-div .cluster-label span,#graph-div p{color:#333;}#graph-div .label text,#graph-div span,#graph-div p{fill:#333;color:#333;}#graph-div .node rect,#graph-div .node circle,#graph-div .node ellipse,#graph-div .node polygon,#graph-div .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#graph-div .flowchart-label text{text-anchor:middle;}#graph-div .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#graph-div .node .label{text-align:center;}#graph-div .node.clickable{cursor:pointer;}#graph-div .arrowheadPath{fill:#333333;}#graph-div .edgePath .path{stroke:#333333;stroke-width:2.0px;}#graph-div .flowchart-link{stroke:#333333;fill:none;}#graph-div .edgeLabel{background-color:#e8e8e8;text-align:center;}#graph-div .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#graph-div .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#graph-div .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#graph-div .cluster text{fill:#333;}#graph-div .cluster span,#graph-div p{color:#333;}#graph-div div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#graph-div .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#graph-div :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="6" viewBox="0 0 10 10" class="marker flowchart" id="graph-div_flowchart-pointEnd"><path style="stroke-width: 1px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"></path></marker><marker orient="auto" markerHeight="12" markerWidth="12" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart" id="graph-div_flowchart-pointStart"><path style="stroke-width: 1px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart" id="graph-div_flowchart-circleEnd"><circle style="stroke-width: 1px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart" id="graph-div_flowchart-circleStart"><circle style="stroke-width: 1px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart" id="graph-div_flowchart-crossEnd"><path style="stroke-width: 2px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart" id="graph-div_flowchart-crossStart"><path style="stroke-width: 2px; stroke-dasharray: 1px, 0px;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><g class="root"><g class="clusters"></g><g class="edgePaths"><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-A LE-B" id="L-A-B-0" d="M612.438,23.106L522.374,31.922C432.311,40.737,252.185,58.369,162.122,72.468C72.058,86.567,72.058,97.133,72.058,102.417L72.058,107.7"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-C" id="L-B-C-0" d="M112.458,141.679L147.172,149.566C181.885,157.453,251.311,173.226,286.024,186.396C320.738,199.567,320.738,210.133,320.738,215.417L320.738,220.7"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-C LE-D" id="L-C-D-0" d="M320.738,265L320.738,271.167C320.738,277.333,320.738,289.667,320.738,301.117C320.738,312.567,320.738,323.133,320.738,328.417L320.738,333.7"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-D LE-E" id="L-D-E-0" d="M320.738,378L320.738,384.167C320.738,390.333,320.738,402.667,324.098,414.249C327.458,425.832,334.179,436.664,337.539,442.08L340.899,447.496"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-B LE-F" id="L-B-F-0" d="M72.058,152L72.058,158.167C72.058,164.333,72.058,176.667,72.058,192.25C72.058,207.833,72.058,226.667,72.058,245.5C72.058,264.333,72.058,283.167,72.058,302C72.058,320.833,72.058,339.667,72.058,358.5C72.058,377.333,72.058,396.167,72.058,415C72.058,433.833,72.058,452.667,72.058,471.5C72.058,490.333,72.058,509.167,116.254,524.63C160.45,540.094,248.843,552.188,293.039,558.235L337.235,564.282"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-F LE-A" id="L-F-A-0" d="M627.905,565L673.094,558.833C718.284,552.667,808.663,540.333,853.852,524.75C899.042,509.167,899.042,490.333,899.042,471.5C899.042,452.667,899.042,433.833,899.042,415C899.042,396.167,899.042,377.333,899.042,358.5C899.042,339.667,899.042,320.833,899.042,302C899.042,283.167,899.042,264.333,899.042,245.5C899.042,226.667,899.042,207.833,899.042,189C899.042,170.167,899.042,151.333,899.042,132.5C899.042,113.667,899.042,94.833,864.416,77.584C829.791,60.335,760.541,44.669,725.915,36.836L691.29,29.004"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-E LE-F" id="L-E-F-0" d="M355.792,491L355.792,497.167C355.792,503.333,355.792,515.667,369.086,527.646C382.38,539.626,408.967,551.251,422.261,557.064L435.555,562.877"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-E LE-A" id="L-E-A-0" d="M420.217,459.097L458.394,451.748C496.571,444.398,572.925,429.699,611.102,412.933C649.279,396.167,649.279,377.333,649.279,358.5C649.279,339.667,649.279,320.833,649.279,302C649.279,283.167,649.279,264.333,649.279,245.5C649.279,226.667,649.279,207.833,649.279,189C649.279,170.167,649.279,151.333,649.279,132.5C649.279,113.667,649.279,94.833,649.279,80.133C649.279,65.433,649.279,54.867,649.279,49.583L649.279,44.3"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-E LE-G" id="L-E-G-0" d="M420.217,477.1L517.811,485.583C615.406,494.067,810.594,511.033,913.519,525.047C1016.444,539.061,1027.105,550.123,1032.435,555.653L1037.766,561.184"></path><path marker-end="url(#graph-div_flowchart-pointEnd)" style="fill:none;" class="edge-thickness-normal edge-pattern-solid flowchart-link LS-G LE-A" id="L-G-A-0" d="M1078.658,565L1084.483,558.833C1090.308,552.667,1101.958,540.333,1107.783,524.75C1113.608,509.167,1113.608,490.333,1113.608,471.5C1113.608,452.667,1113.608,433.833,1113.608,415C1113.608,396.167,1113.608,377.333,1113.608,358.5C1113.608,339.667,1113.608,320.833,1113.608,302C1113.608,283.167,1113.608,264.333,1113.608,245.5C1113.608,226.667,1113.608,207.833,1113.608,189C1113.608,170.167,1113.608,151.333,1113.608,132.5C1113.608,113.667,1113.608,94.833,1043.237,76.854C972.866,58.874,832.124,41.749,761.753,33.186L691.382,24.623"></path></g><g class="edgeLabels"><g transform="translate(72.05833435058594, 76)" class="edgeLabel"><g transform="translate(-59.166664123535156, -12)" class="label"><foreignObject height="24" width="118.33332824707031"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">lookup metadata</span></div></foreignObject></g></g><g transform="translate(320.7375030517578, 189)" class="edgeLabel"><g transform="translate(-58.708335876464844, -12)" class="label"><foreignObject height="24" width="117.41667175292969"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">is reusable entry</span></div></foreignObject></g></g><g transform="translate(320.7375030517578, 302)" class="edgeLabel"><g transform="translate(-84.06666564941406, -12)" class="label"><foreignObject height="24" width="168.13333129882812"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">lookup reusable chunks</span></div></foreignObject></g></g><g transform="translate(320.7375030517578, 415)" class="edgeLabel"><g transform="translate(-136.5500030517578, -12)" class="label"><foreignObject height="24" width="273.1000061035156"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">insert and deduplicate dynamic entries</span></div></foreignObject></g></g><g transform="translate(72.05833435058594, 358.5)" class="edgeLabel"><g transform="translate(-72.05833435058594, -12)" class="label"><foreignObject height="24" width="144.11666870117188"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">is not reusable entry</span></div></foreignObject></g></g><g transform="translate(899.0416793823242, 302)" class="edgeLabel"><g transform="translate(-59.599998474121094, -12)" class="label"><foreignObject height="24" width="119.19999694824219"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">caching disabled</span></div></foreignObject></g></g><g transform="translate(355.7916717529297, 528)" class="edgeLabel"><g transform="translate(-238.43333435058594, -12)" class="label"><foreignObject height="24" width="476.8666687011719"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">padding above threshold, non-continuous chunks, caching disabled</span></div></foreignObject></g></g><g transform="translate(649.2791748046875, 245.5)" class="edgeLabel"><g transform="translate(-221.0916748046875, -12)" class="label"><foreignObject height="24" width="442.183349609375"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">padding above threshold, chunks continuous, caching enabled</span></div></foreignObject></g></g><g transform="translate(1005.7833480834961, 528)" class="edgeLabel"><g transform="translate(-86.74166870117188, -12)" class="label"><foreignObject height="24" width="173.48333740234375"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">padding below threshold</span></div></foreignObject></g></g><g transform="translate(1113.6083526611328, 302)" class="edgeLabel"><g transform="translate(-58.275001525878906, -12)" class="label"><foreignObject height="24" width="116.55000305175781"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="edgeLabel">caching enabled</span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(649.2791748046875, 19.5)" data-id="A" data-node="true" id="flowchart-A-12299" class="node default default flowchart-label"><rect height="39" width="73.68333435058594" y="-19.5" x="-36.84166717529297" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-29.34166717529297, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="58.68333435058594"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Archiver</span></div></foreignObject></g></g><g transform="translate(72.05833435058594, 132.5)" data-id="B" data-node="true" id="flowchart-B-12300" class="node default default flowchart-label"><rect height="39" width="80.80000305175781" y="-19.5" x="-40.400001525878906" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-32.900001525878906, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="65.80000305175781"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Accessor</span></div></foreignObject></g></g><g transform="translate(320.7375030517578, 245.5)" data-id="C" data-node="true" id="flowchart-C-12302" class="node default default flowchart-label"><rect height="39" width="144.89999389648438" y="-19.5" x="-72.44999694824219" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-64.94999694824219, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="129.89999389648438"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Lookahead Cache</span></div></foreignObject></g></g><g transform="translate(320.7375030517578, 358.5)" data-id="D" data-node="true" id="flowchart-D-12304" class="node default default flowchart-label"><rect height="39" width="120.83332824707031" y="-19.5" x="-60.416664123535156" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-52.916664123535156, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="105.83332824707031"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Dynamic Index</span></div></foreignObject></g></g><g transform="translate(355.7916717529297, 471.5)" data-id="E" data-node="true" id="flowchart-E-12306" class="node default default flowchart-label"><rect height="39" width="128.85000610351562" y="-19.5" x="-64.42500305175781" ry="0" rx="0" style="" class="basic label-container"></rect><g transform="translate(-56.92500305175781, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="113.85000610351562"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Reused Chunks</span></div></foreignObject></g></g><g transform="translate(485.00833892822266, 584.5)" data-id="F" data-node="true" id="flowchart-F-12308" class="node default default flowchart-label"><rect height="39" width="321.04998779296875" y="-19.5" x="-160.52499389648438" ry="5" rx="5" style="" class="basic label-container"></rect><g transform="translate(-153.02499389648438, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="306.04998779296875"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">re-encode cached entries and current entry</span></div></foreignObject></g></g><g transform="translate(1060.2375183105469, 584.5)" data-id="G" data-node="true" id="flowchart-G-12316" class="node default default flowchart-label"><rect height="39" width="527.11669921875" y="-19.5" x="-263.558349609375" ry="5" rx="5" style="" class="basic label-container"></rect><g transform="translate(-256.058349609375, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="512.11669921875"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">force boundary, inject chunks, keepback last chunk for potential followup</span></div></foreignObject></g></g></g></g></g></svg>
\ No newline at end of file
diff --git a/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.txt b/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.txt
new file mode 100644
index 000000000..5eace70be
--- /dev/null
+++ b/pbs-client/src/pxar/flow-chart-metadata-based-file-change-detection.txt
@@ -0,0 +1,12 @@
+flowchart TD
+ A[Archiver] -->|lookup metadata| B[Accessor]
+ B -->|is reusable entry| C[Lookahead Cache]
+ C -->|lookup reusable chunks| D[Dynamic Index]
+ D -->|insert and deduplicate dynamic entries| E[Reused Chunks]
+ B -->|is not reusable entry| F(re-encode cached entries and current entry)
+ F -->|caching disabled| A
+ E -->|padding above threshold, non-continuous chunks, caching disabled| F
+ E -->|padding above threshold, chunks continuous, caching enabled| A
+ E -->|padding below threshold| G(force boundary, inject chunks, keepback last chunk for potential followup)
+ G -->|caching enabled| A
+
--
2.39.2
More information about the pbs-devel
mailing list