From 2799a2e7e14c2ecb88ce1faf6e8d0b9e93e124e1 Mon Sep 17 00:00:00 2001 From: Andrei Strelkovskii Date: Fri, 10 Jan 2025 18:48:41 +0100 Subject: [PATCH] filestore docs: BlockList and Rebase logic (#2833) --- .../design/storage/tablet/block_list.md | 7 + .../design/storage/tablet/data_index.md | 1 + .../mixed_blocks_rebase_logic.excalidraw | 2988 +++++++++++++++++ .../excalidraw/mixed_blocks_rebase_logic.svg | 2 + 4 files changed, 2998 insertions(+) create mode 100644 doc/filestore/design/storage/tablet/block_list.md create mode 100644 doc/filestore/excalidraw/mixed_blocks_rebase_logic.excalidraw create mode 100644 doc/filestore/excalidraw/mixed_blocks_rebase_logic.svg diff --git a/doc/filestore/design/storage/tablet/block_list.md b/doc/filestore/design/storage/tablet/block_list.md new file mode 100644 index 0000000000..360014bcc9 --- /dev/null +++ b/doc/filestore/design/storage/tablet/block_list.md @@ -0,0 +1,7 @@ +# Block List format and Rebase logic + +[MixedBlocks](data_index.md#mixedblocks) stores block metadata for each blob in the form of [BlockLists](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/model/block_list.h). BlockLists have complex binary format and are encoded by [this code](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/model/block_list_encode.cpp). CommitIds of the blocks described by BlockLists can be changed by the [rebase logic](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/rebase_logic.cpp) to improve metadata grouping and decrease BlockList size. + +Deletions in BlockList code simply mean block MaxCommitIds and are not directly related to DeletionMarkers. + +![mixed_blocks_svg](../../../excalidraw/mixed_blocks_rebase_logic.svg) diff --git a/doc/filestore/design/storage/tablet/data_index.md b/doc/filestore/design/storage/tablet/data_index.md index fe3dac357d..9db8e5a61a 100644 --- a/doc/filestore/design/storage/tablet/data_index.md +++ b/doc/filestore/design/storage/tablet/data_index.md @@ -26,6 +26,7 @@ It is the main layer intended for long-term data storage. * Each blob may contain blocks belonging to multiple different inodes. * Each range is supposed to contain up to 4MiB of data (sometimes slightly more due to hash collisions). * Each write generates DeletionMarkers which are later applied to the MixedBlocks table via the [Cleanup operation](https://github.com/ydb-platform/nbs/blob/main/cloud/filestore/libs/storage/tablet/tablet_actor_cleanup.cpp). +* Block metadata for each blob is stored in a [BlockList](block_list.md). ![mixed_blocks_svg](../../../excalidraw/mixed_blocks.svg) diff --git a/doc/filestore/excalidraw/mixed_blocks_rebase_logic.excalidraw b/doc/filestore/excalidraw/mixed_blocks_rebase_logic.excalidraw new file mode 100644 index 0000000000..eabce739b9 --- /dev/null +++ b/doc/filestore/excalidraw/mixed_blocks_rebase_logic.excalidraw @@ -0,0 +1,2988 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "id": "Grr8wuInHW01MuvTI5qEe", + "type": "rectangle", + "x": -2597.3435336058283, + "y": -29808.691102233468, + "width": 1806, + "height": 259.99999999999994, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9q", + "roundness": { + "type": 3 + }, + "seed": 1484140195, + "version": 267, + "versionNonce": 997639331, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "uWr74KbGFdog88o0eVa3W", + "type": "rectangle", + "x": -2587.3435336058283, + "y": -29796.691102233468, + "width": 298, + "height": 235, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9r", + "roundness": { + "type": 3 + }, + "seed": 1830388451, + "version": 256, + "versionNonce": 370948163, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "ds2FkRxXbIcNnMSJVA5WL" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "ds2FkRxXbIcNnMSJVA5WL", + "type": "text", + "x": -2547.873570532098, + "y": -29791.691102233468, + "width": 219.06007385253906, + "height": 225, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9s", + "roundness": null, + "seed": 2057022755, + "version": 323, + "versionNonce": 1326594019, + "isDeleted": false, + "boundElements": null, + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeId1\nMinCommitId1\nBlockCount1\nBlockIndex1\nBlobOffset1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "uWr74KbGFdog88o0eVa3W", + "originalText": "NodeId1\nMinCommitId1\nBlockCount1\nBlockIndex1\nBlobOffset1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "2w5g0ILuAzgXSkIUMZQoA", + "type": "rectangle", + "x": -2278.3435336058283, + "y": -29796.191102233468, + "width": 298, + "height": 235, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9v", + "roundness": { + "type": 3 + }, + "seed": 2053117421, + "version": 320, + "versionNonce": 1684489091, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "zWAVQuq3Us24bUUcXZ5lB" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "zWAVQuq3Us24bUUcXZ5lB", + "type": "text", + "x": -2246.811574072137, + "y": -29791.191102233468, + "width": 234.9360809326172, + "height": 225, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9w", + "roundness": null, + "seed": 1394659405, + "version": 397, + "versionNonce": 240769827, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeId2\nMinCommitId2\nBlockCount2\nBlockIndex2\nBlobOffset2", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "2w5g0ILuAzgXSkIUMZQoA", + "originalText": "NodeId2\nMinCommitId2\nBlockCount2\nBlockIndex2\nBlobOffset2", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "jsouvz4gylizZGbQeG67n", + "type": "rectangle", + "x": -1102.3435336058283, + "y": -29796.191102233468, + "width": 298, + "height": 235, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9x", + "roundness": { + "type": 3 + }, + "seed": 1414227821, + "version": 385, + "versionNonce": 2035842755, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "NTUp4cBjXj7UpxjEoE4sR" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "NTUp4cBjXj7UpxjEoE4sR", + "type": "text", + "x": -1069.5875750486994, + "y": -29791.191102233468, + "width": 232.4880828857422, + "height": 225, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "b9y", + "roundness": null, + "seed": 1185280461, + "version": 472, + "versionNonce": 1073852003, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeIdN\nMinCommitIdN\nBlockCountN\nBlockIndexN\nBlobOffsetN", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "jsouvz4gylizZGbQeG67n", + "originalText": "NodeIdN\nMinCommitIdN\nBlockCountN\nBlockIndexN\nBlobOffsetN", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "xw68TzRe5oqDJOkEPXHYk", + "type": "text", + "x": -1567.3435336058283, + "y": -29710.691102233468, + "width": 288.39999999999543, + "height": 62.999999999999, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA0", + "roundness": null, + "seed": 331990467, + "version": 100, + "versionNonce": 623110659, + "isDeleted": false, + "boundElements": null, + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "...", + "fontSize": 50.39999999999919, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "...", + "autoResize": false, + "lineHeight": 1.25 + }, + { + "id": "UoiJxuQ5UADUk3qGoXclf", + "type": "rectangle", + "x": -2598.3435336058283, + "y": -29516.691102233468, + "width": 1808, + "height": 179.99999999999994, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA1", + "roundness": { + "type": 3 + }, + "seed": 665109251, + "version": 339, + "versionNonce": 230535587, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "-SNLWasI52X3GZ9dZ-eyU", + "type": "rectangle", + "x": -2588.3435336058283, + "y": -29504.691102233468, + "width": 297.665731912507, + "height": 155.16985138004245, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA2", + "roundness": { + "type": 3 + }, + "seed": 482044579, + "version": 328, + "versionNonce": 989693251, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "RkXb5koUeUmyJL8M1chzD" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "RkXb5koUeUmyJL8M1chzD", + "type": "text", + "x": -2558.8147066510396, + "y": -29494.606176543446, + "width": 238.6080780029297, + "height": 135, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA3", + "roundness": null, + "seed": 1943805507, + "version": 401, + "versionNonce": 1145169123, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeId1\nMaxCommitId1\nBlobOffset1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "-SNLWasI52X3GZ9dZ-eyU", + "originalText": "NodeId1\nMaxCommitId1\nBlobOffset1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "i8I-p6m_lByzY0jr4mDhS", + "type": "rectangle", + "x": -2279.6901404482287, + "y": -29504.36095361351, + "width": 297.665731912507, + "height": 155.16985138004245, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA4", + "roundness": { + "type": 3 + }, + "seed": 2011520483, + "version": 392, + "versionNonce": 1360613507, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "lu95V7o6aDnRpKLmdXpM1" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "lu95V7o6aDnRpKLmdXpM1", + "type": "text", + "x": -2258.099317033479, + "y": -29494.27602792349, + "width": 254.4840850830078, + "height": 135, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA5", + "roundness": null, + "seed": 333818243, + "version": 475, + "versionNonce": 323110947, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeId2\nMaxCommitId2\nBlobOffset2", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "i8I-p6m_lByzY0jr4mDhS", + "originalText": "NodeId2\nMaxCommitId2\nBlobOffset2", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "6v9psIVckLQFh-GcYwE5f", + "type": "rectangle", + "x": -1105.0092655183353, + "y": -29504.36095361351, + "width": 297.665731912507, + "height": 155.16985138004245, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA6", + "roundness": { + "type": 3 + }, + "seed": 1293648163, + "version": 457, + "versionNonce": 11226051, + "isDeleted": false, + "boundElements": [ + { + "type": "text", + "id": "imcwlLBnGWlxz1XIMqp8d" + } + ], + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "imcwlLBnGWlxz1XIMqp8d", + "type": "text", + "x": -1082.1944430801482, + "y": -29494.27602792349, + "width": 252.0360870361328, + "height": 135, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA7", + "roundness": null, + "seed": 2096456899, + "version": 550, + "versionNonce": 1299372899, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "NodeIdN\nMaxCommitIdN\nBlobOffsetN", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "6v9psIVckLQFh-GcYwE5f", + "originalText": "NodeIdN\nMaxCommitIdN\nBlobOffsetN", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "4TX0j9P8hZFMQjLS09EgW", + "type": "text", + "x": -1562.3435336058283, + "y": -29460.691102233468, + "width": 288.39999999999543, + "height": 62.999999999999, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "#ffffff", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA8", + "roundness": null, + "seed": 1259459683, + "version": 162, + "versionNonce": 635926275, + "isDeleted": false, + "boundElements": [], + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "...", + "fontSize": 50.39999999999919, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "...", + "autoResize": false, + "lineHeight": 1.25 + }, + { + "id": "nxza8p4W-3WPTm5Vxn07s", + "type": "rectangle", + "x": -2615.3435336058283, + "y": -29898.691102233468, + "width": 1850, + "height": 574, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bA9", + "roundness": { + "type": 3 + }, + "seed": 80437485, + "version": 178, + "versionNonce": 679976611, + "isDeleted": false, + "boundElements": null, + "updated": 1736528029313, + "link": null, + "locked": false + }, + { + "id": "mloRdUKN3w2AH0PZIweoc", + "type": "text", + "x": -2507.3435336058283, + "y": -29866.691102233468, + "width": 160.52406311035156, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAA", + "roundness": null, + "seed": 162610051, + "version": 28, + "versionNonce": 536990275, + "isDeleted": false, + "boundElements": null, + "updated": 1736528029313, + "link": null, + "locked": false, + "text": "BlockList", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "BlockList", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "Jj7xi0fI29t4DdEwujcKU", + "type": "text", + "x": -2629.3435336058283, + "y": -30438.691102233468, + "width": 1910.9886474609375, + "height": 495, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAC", + "roundness": null, + "seed": 1783001517, + "version": 946, + "versionNonce": 339730957, + "isDeleted": false, + "boundElements": null, + "updated": 1736528242813, + "link": null, + "locked": false, + "text": "Blocks stored in a MixedBlob are described by \"BlockList\" structures. BlockList stores the following info\nabout each block stored in the blob:\n* NodeId\n* MinCommitId and MaxCommitId\n* BlockIndex\n* Offset in blob\nSo there is a lot of metadata to store per block. To minimize the physical size of the metadata, we try\nto compress it by:\n* storing MaxCommitIds separately from MinCommitIds\n* grouping the data in each of those 2 structures by NodeId, then by CommitId and store ranges instead\nof individual block infos per each pair:", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Blocks stored in a MixedBlob are described by \"BlockList\" structures. BlockList stores the following info\nabout each block stored in the blob:\n* NodeId\n* MinCommitId and MaxCommitId\n* BlockIndex\n* Offset in blob\nSo there is a lot of metadata to store per block. To minimize the physical size of the metadata, we try\nto compress it by:\n* storing MaxCommitIds separately from MinCommitIds\n* grouping the data in each of those 2 structures by NodeId, then by CommitId and store ranges instead\nof individual block infos per each pair:", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "rAuxTgaaov7lfjxbTaovA", + "type": "text", + "x": -2627.3435336058283, + "y": -29270.691102233468, + "width": 918.7122802734375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAE", + "roundness": null, + "seed": 472410787, + "version": 78, + "versionNonce": 1226871373, + "isDeleted": false, + "boundElements": null, + "updated": 1736528284147, + "link": null, + "locked": false, + "text": "Note: if BlockCount == 1, then this field is omitted.", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Note: if BlockCount == 1, then this field is omitted.", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "9dwl_DxWQzikk_TaFYmrl", + "type": "text", + "x": -2627.3435336058283, + "y": -29120.691102233468, + "width": 217.04405212402344, + "height": 90, + "angle": 0, + "strokeColor": "#1971c2", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAG", + "roundness": null, + "seed": 110598563, + "version": 668, + "versionNonce": 721573731, + "isDeleted": false, + "boundElements": null, + "updated": 1736528520758, + "link": null, + "locked": false, + "text": "Rebase logic\n", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Rebase logic\n", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "f-uL0h90NRD_35IYu96y-", + "type": "text", + "x": -2626.1958895628595, + "y": -29040.191102233468, + "width": 2065.78857421875, + "height": 855, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAH", + "roundness": null, + "seed": 320143885, + "version": 2247, + "versionNonce": 919707587, + "isDeleted": false, + "boundElements": [], + "updated": 1736529648259, + "link": null, + "locked": false, + "text": "Grouping by NodeId is easy - if we store multiple blocks per Node in a single blob (we try to store 64 blocks\nper Node in each blob - see the data index docs), then NodeId will be written only once for all blocks. But\nCommitIds will be different for all blocks if a file is written block by block. To make as many CommitIds equal\nto each other as possible, our background operations actually modify the original CommitIds - it's called\n\"rebase\" in the code. \n\nWe need CommitIds to know which block versions should be observable at a specific point in time (CommitId is a\nlogical point in time) and which shouldn't. The points in time which are of interest for us are:\n* LastCommitId - i.e. \"now\"\n* CheckpointCommitIds\nIf a version of a block has MinCommitId <= CheckpointCommitId and MaxCommitId > CheckpointCommitId, then it\nshould be observable at CheckpointCommitId, otherwise - it shouldn't. As for LastCommitId - all blocks whose\nMaxCommitId == InvalidCommitId should be observable at LastCommitId, blocks with valid MaxCommitId - shouldn't.\nSo we can increment block CommitIds without changing the observability of block versions as long as we don't move\nCommitId past the next CheckpointCommitId.\n\nThe rebase logic simply updates block CommitIds by making them equal to the first CheckpointCommitId which is not\nless than the CommitId of the block. If all CheckpointCommitIds are smaller than block CommitId, we just set\nblock CommitId to be equal to LastCommitId. It makes most of the CommitIds in a blob equal to each other.", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Grouping by NodeId is easy - if we store multiple blocks per Node in a single blob (we try to store 64 blocks\nper Node in each blob - see the data index docs), then NodeId will be written only once for all blocks. But\nCommitIds will be different for all blocks if a file is written block by block. To make as many CommitIds equal\nto each other as possible, our background operations actually modify the original CommitIds - it's called\n\"rebase\" in the code. \n\nWe need CommitIds to know which block versions should be observable at a specific point in time (CommitId is a\nlogical point in time) and which shouldn't. The points in time which are of interest for us are:\n* LastCommitId - i.e. \"now\"\n* CheckpointCommitIds\nIf a version of a block has MinCommitId <= CheckpointCommitId and MaxCommitId > CheckpointCommitId, then it\nshould be observable at CheckpointCommitId, otherwise - it shouldn't. As for LastCommitId - all blocks whose\nMaxCommitId == InvalidCommitId should be observable at LastCommitId, blocks with valid MaxCommitId - shouldn't.\nSo we can increment block CommitIds without changing the observability of block versions as long as we don't move\nCommitId past the next CheckpointCommitId.\n\nThe rebase logic simply updates block CommitIds by making them equal to the first CheckpointCommitId which is not\nless than the CommitId of the block. If all CheckpointCommitIds are smaller than block CommitId, we just set\nblock CommitId to be equal to LastCommitId. It makes most of the CommitIds in a blob equal to each other.", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "2mg0H_TQb3SoFMg_yXbYl", + "type": "arrow", + "x": -2629.3435336058283, + "y": -27368.691102233468, + "width": 1878, + "height": 4, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAJ", + "roundness": { + "type": 2 + }, + "seed": 715966179, + "version": 65, + "versionNonce": 1041389773, + "isDeleted": false, + "boundElements": null, + "updated": 1736529670118, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 1878, + 4 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "SlXXhZZUUFBWEgiwxD831", + "type": "text", + "x": -779.3435336058283, + "y": -27318.691102233468, + "width": 157.0320587158203, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAL", + "roundness": null, + "seed": 63871757, + "version": 17, + "versionNonce": 952140259, + "isDeleted": false, + "boundElements": null, + "updated": 1736529676776, + "link": null, + "locked": false, + "text": "CommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "CommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "LFGIWpBeWCROYuMh_dI1-", + "type": "line", + "x": -2269.3435336058283, + "y": -27098.691102233468, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAM", + "roundness": { + "type": 2 + }, + "seed": 1735717517, + "version": 47, + "versionNonce": 1669458979, + "isDeleted": false, + "boundElements": null, + "updated": 1736529683413, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "M6DT0YOSzE-j7yWBu8jCp", + "type": "line", + "x": -1792.2360723057086, + "y": -27094.026684152646, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAN", + "roundness": { + "type": 2 + }, + "seed": 1230741997, + "version": 98, + "versionNonce": 871753987, + "isDeleted": false, + "boundElements": [], + "updated": 1736529688101, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "mtbkJiD_QE66IWB5EBf0s", + "type": "line", + "x": -1359.521031133204, + "y": -27086.674246191546, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAO", + "roundness": { + "type": 2 + }, + "seed": 1318831171, + "version": 124, + "versionNonce": 295755373, + "isDeleted": false, + "boundElements": [], + "updated": 1736529692022, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "X7hwk29-BXNtIbb4anGQq", + "type": "text", + "x": -2361.3435336058283, + "y": -27044.691102233468, + "width": 188.74806213378906, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAP", + "roundness": null, + "seed": 1381529997, + "version": 34, + "versionNonce": 1680976867, + "isDeleted": false, + "boundElements": null, + "updated": 1736529702362, + "link": null, + "locked": false, + "text": "Checkpoint1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Checkpoint1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "TFVFJhM1VdnZ0b2jRJ6_x", + "type": "text", + "x": -1885.7175646727228, + "y": -27039.191102233468, + "width": 204.6240692138672, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAQ", + "roundness": null, + "seed": 1910074669, + "version": 36, + "versionNonce": 103129293, + "isDeleted": false, + "boundElements": [], + "updated": 1736529706178, + "link": null, + "locked": false, + "text": "Checkpoint2", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Checkpoint2", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "bQ7aqKBgYef3gTPlIjBfW", + "type": "text", + "x": -1457.6555682127619, + "y": -27035.191102233468, + "width": 242.49609375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAR", + "roundness": null, + "seed": 116643821, + "version": 67, + "versionNonce": 1987206499, + "isDeleted": false, + "boundElements": [], + "updated": 1736529712843, + "link": null, + "locked": false, + "text": "LastCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "LastCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "onrcMG9BVG8Vjqq6uzvPR", + "type": "line", + "x": -2521.3435336058283, + "y": -27224.691102233468, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAS", + "roundness": { + "type": 2 + }, + "seed": 19099405, + "version": 46, + "versionNonce": 1062648013, + "isDeleted": false, + "boundElements": null, + "updated": 1736529742865, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "SS8Bunun36w53wuLh6_p4", + "type": "line", + "x": -1943.347223741794, + "y": -27221.290667068522, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAT", + "roundness": { + "type": 2 + }, + "seed": 1980890659, + "version": 83, + "versionNonce": 683280547, + "isDeleted": false, + "boundElements": [], + "updated": 1736529751660, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "qVR64FI3autAa3PBZcxrX", + "type": "line", + "x": -1655.347223741794, + "y": -27223.290667068522, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAW", + "roundness": { + "type": 2 + }, + "seed": 278807213, + "version": 88, + "versionNonce": 971041699, + "isDeleted": false, + "boundElements": [], + "updated": 1736529792270, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "kpNqDOo5SCSfzpidfvm47", + "type": "line", + "x": -1505.298461608912, + "y": -27220.16762234698, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAX", + "roundness": { + "type": 2 + }, + "seed": 428438733, + "version": 139, + "versionNonce": 552639043, + "isDeleted": false, + "boundElements": [], + "updated": 1736529798108, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "ezCeMSrGoIH97ayOBUqhH", + "type": "line", + "x": -1409.2915036359127, + "y": -27218.75242443041, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAZ", + "roundness": { + "type": 2 + }, + "seed": 414742317, + "version": 111, + "versionNonce": 1002373699, + "isDeleted": false, + "boundElements": [], + "updated": 1736529831669, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "0sI2n8Ormx2q5rAo2hUjX", + "type": "text", + "x": -2387.3435336058283, + "y": -26772.691102233468, + "width": 229.24806213378906, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAa", + "roundness": null, + "seed": 145175555, + "version": 32, + "versionNonce": 1712659565, + "isDeleted": false, + "boundElements": null, + "updated": 1736529925613, + "link": null, + "locked": false, + "text": "block version1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "block version1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "6n59U1RjZiyvJxU5213k0", + "type": "arrow", + "x": -2325.3435336058283, + "y": -26806.691102233468, + "width": 192, + "height": 374, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAb", + "roundness": { + "type": 2 + }, + "seed": 1984462189, + "version": 352, + "versionNonce": 1866709773, + "isDeleted": false, + "boundElements": null, + "updated": 1736529869025, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -92, + -108 + ], + [ + -192, + -374 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "Soq7h__A_T3IwvY7Uv_9X", + "type": "arrow", + "x": -2237.3435336058283, + "y": -26808.691102233468, + "width": 296, + "height": 380, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAc", + "roundness": { + "type": 2 + }, + "seed": 1629098637, + "version": 97, + "versionNonce": 1345217869, + "isDeleted": false, + "boundElements": null, + "updated": 1736529885660, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 222, + -174 + ], + [ + 296, + -380 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "ZGRQqewnbZMDJOCxsYAG9", + "type": "text", + "x": -2639.3435336058283, + "y": -26898.691102233468, + "width": 209.3040771484375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAd", + "roundness": null, + "seed": 290253933, + "version": 34, + "versionNonce": 894055459, + "isDeleted": false, + "boundElements": null, + "updated": 1736529901476, + "link": null, + "locked": false, + "text": "MinCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MinCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "WFiTU4AZqSTFi4uuTAI_D", + "type": "text", + "x": -2143.995572180047, + "y": -26851.191102233468, + "width": 228.85208129882812, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAe", + "roundness": null, + "seed": 1231479555, + "version": 83, + "versionNonce": 1615009837, + "isDeleted": false, + "boundElements": [], + "updated": 1736529949202, + "link": null, + "locked": false, + "text": "MaxCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MaxCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "4O53xIPst40RFi5NJz1U0", + "type": "text", + "x": -1893.8735476439142, + "y": -26545.191102233468, + "width": 263.12408447265625, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAf", + "roundness": null, + "seed": 203872205, + "version": 29, + "versionNonce": 1372750061, + "isDeleted": false, + "boundElements": [], + "updated": 1736529928810, + "link": null, + "locked": false, + "text": "block version 2", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "block version 2", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "6aWx95acXuiPgVEPQ0nw_", + "type": "arrow", + "x": -1759.3435336058283, + "y": -26572.691102233468, + "width": 118, + "height": 612, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAg", + "roundness": { + "type": 2 + }, + "seed": 78571949, + "version": 88, + "versionNonce": 710388877, + "isDeleted": false, + "boundElements": null, + "updated": 1736529936380, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 118, + -280 + ], + [ + 106, + -612 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "UiSsRBLhEBPtBOfXijl0T", + "type": "arrow", + "x": -1689.3435336058283, + "y": -26572.691102233468, + "width": 190, + "height": 600, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAh", + "roundness": { + "type": 2 + }, + "seed": 197926499, + "version": 96, + "versionNonce": 2088635821, + "isDeleted": false, + "boundElements": null, + "updated": 1736529944918, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 190, + -276 + ], + [ + 182, + -600 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "_Ix-3atw22-tvZM7dNpTP", + "type": "text", + "x": -1925.995572180047, + "y": -26711.191102233468, + "width": 209.3040771484375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAi", + "roundness": null, + "seed": 1989472461, + "version": 58, + "versionNonce": 1992337987, + "isDeleted": false, + "boundElements": [], + "updated": 1736529947932, + "link": null, + "locked": false, + "text": "MinCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MinCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "08uw-IG7O_AUwg-uR2DuR", + "type": "text", + "x": -1563.7695742552423, + "y": -26683.191102233468, + "width": 228.85208129882812, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAj", + "roundness": null, + "seed": 1590866157, + "version": 118, + "versionNonce": 6492163, + "isDeleted": false, + "boundElements": [], + "updated": 1736529951601, + "link": null, + "locked": false, + "text": "MaxCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MaxCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "RSIxU2nSbXvkdiyTOLUuS", + "type": "text", + "x": -1184.9055758421564, + "y": -26751.191102233468, + "width": 262.008056640625, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAk", + "roundness": null, + "seed": 30067427, + "version": 58, + "versionNonce": 1208849709, + "isDeleted": false, + "boundElements": [], + "updated": 1736530075651, + "link": null, + "locked": false, + "text": "block version 3", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "block version 3", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "4YMmkSQMqBWKL8esuE12z", + "type": "arrow", + "x": -1203.3435336058283, + "y": -26766.691102233468, + "width": 202, + "height": 412, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAl", + "roundness": { + "type": 2 + }, + "seed": 707971309, + "version": 101, + "versionNonce": 916814957, + "isDeleted": false, + "boundElements": null, + "updated": 1736529966587, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -168, + -122 + ], + [ + -202, + -412 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "Y8AQen8vdd9JhSOgzlrVA", + "type": "text", + "x": -1295.995572180047, + "y": -26889.191102233468, + "width": 209.3040771484375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAm", + "roundness": null, + "seed": 955897741, + "version": 80, + "versionNonce": 1648301123, + "isDeleted": false, + "boundElements": [], + "updated": 1736529970084, + "link": null, + "locked": false, + "text": "MinCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MinCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "SSUnWRitjmjar0qpV3D3o", + "type": "text", + "x": -2624.2378207152033, + "y": -26408.191102233468, + "width": 2055.78857421875, + "height": 180, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAn", + "roundness": null, + "seed": 1687828259, + "version": 2599, + "versionNonce": 471073283, + "isDeleted": false, + "boundElements": [], + "updated": 1736530071336, + "link": null, + "locked": false, + "text": "In this example we have 3 versions of the same block:\n* version 1 was created before Checkpoint1 and deleted before Checkpoint2\n* version 2 was created after Checkpoint2 and deleted after that\n* version 3 was created after the deletion of version 2 and wasn't deleted ", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "In this example we have 3 versions of the same block:\n* version 1 was created before Checkpoint1 and deleted before Checkpoint2\n* version 2 was created after Checkpoint2 and deleted after that\n* version 3 was created after the deletion of version 2 and wasn't deleted ", + "autoResize": false, + "lineHeight": 1.25 + }, + { + "id": "54CwZ4_SRgesL_p6DJEpp", + "type": "arrow", + "x": -2631.8595629637384, + "y": -25525.610908381394, + "width": 1878, + "height": 4, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAo", + "roundness": { + "type": 2 + }, + "seed": 1877115171, + "version": 123, + "versionNonce": 609221539, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 1878, + 4 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "y5cjdL8PcCh69o0yixLyP", + "type": "text", + "x": -781.8595629637384, + "y": -25475.610908381394, + "width": 157.0320587158203, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAp", + "roundness": null, + "seed": 786195651, + "version": 75, + "versionNonce": 481726275, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "text": "CommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "CommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "JB93N6VZEOkwaA6cw-GF0", + "type": "line", + "x": -2271.8595629637384, + "y": -25255.610908381394, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAq", + "roundness": { + "type": 2 + }, + "seed": 672715875, + "version": 105, + "versionNonce": 1581887203, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "AeBFFPwPNEKSQ0xL-CY66", + "type": "line", + "x": -1794.7521016636183, + "y": -25250.946490300572, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAr", + "roundness": { + "type": 2 + }, + "seed": 191254531, + "version": 156, + "versionNonce": 731372163, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "Iq_S5z8p5UCtseL6ey2pP", + "type": "line", + "x": -1362.037060491114, + "y": -25243.594052339467, + "width": 8, + "height": 892, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAs", + "roundness": { + "type": 2 + }, + "seed": 180574115, + "version": 182, + "versionNonce": 1902088739, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -8, + -892 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "bZLaMhgDMx6DmWTRrFf3p", + "type": "text", + "x": -2363.8595629637384, + "y": -25201.610908381394, + "width": 188.74806213378906, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAt", + "roundness": null, + "seed": 341732163, + "version": 92, + "versionNonce": 9393603, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "text": "Checkpoint1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Checkpoint1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "VQRB5sDRbzBse4oHbakvp", + "type": "text", + "x": -1888.233594030633, + "y": -25196.110908381394, + "width": 204.6240692138672, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAu", + "roundness": null, + "seed": 1284901603, + "version": 94, + "versionNonce": 138782051, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "text": "Checkpoint2", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "Checkpoint2", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "8BdckfrnGK3H_rs3rir2p", + "type": "text", + "x": -1460.171597570672, + "y": -25192.110908381394, + "width": 242.49609375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "dotted", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAv", + "roundness": null, + "seed": 1207481987, + "version": 125, + "versionNonce": 1339097347, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084061, + "link": null, + "locked": false, + "text": "LastCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "LastCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "Tu2z-ll3g4mhS2e0pdzxx", + "type": "line", + "x": -2277.8595629637384, + "y": -25367.610908381394, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAw", + "roundness": { + "type": 2 + }, + "seed": 88403491, + "version": 158, + "versionNonce": 2136363469, + "isDeleted": false, + "boundElements": [], + "updated": 1736530149747, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "xe7PlY-nOUoM26J9XIfj2", + "type": "line", + "x": -1801.8632530997038, + "y": -25378.210473216444, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#e03131", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bAx", + "roundness": { + "type": 2 + }, + "seed": 661205443, + "version": 172, + "versionNonce": 2131018733, + "isDeleted": false, + "boundElements": [], + "updated": 1736530161223, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "qjCdmKcU-7J5Tv8zgvnoD", + "type": "line", + "x": -1367.8075329938229, + "y": -25381.672230578333, + "width": 0, + "height": 544, + "angle": 0, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB0", + "roundness": { + "type": 2 + }, + "seed": 688342179, + "version": 184, + "versionNonce": 1243436557, + "isDeleted": false, + "boundElements": [], + "updated": 1736530185645, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 0, + -544 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": null + }, + { + "id": "uvl_Yw_6BrPlQzTpkIKEK", + "type": "text", + "x": -2389.8595629637384, + "y": -24929.610908381394, + "width": 229.24806213378906, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB1", + "roundness": null, + "seed": 2107422787, + "version": 90, + "versionNonce": 1381704387, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084062, + "link": null, + "locked": false, + "text": "block version1", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "block version1", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "tBf3OcJJMlM4QdzD0i7aY", + "type": "arrow", + "x": -2327.8595629637384, + "y": -24963.610908381394, + "width": 120, + "height": 396, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB2", + "roundness": { + "type": 2 + }, + "seed": 1921169379, + "version": 451, + "versionNonce": 71236035, + "isDeleted": false, + "boundElements": [], + "updated": 1736530155518, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -92, + -108 + ], + [ + 28, + -396 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "aYiK2hqKUskDvG1ClMl-u", + "type": "arrow", + "x": -2239.8595629637384, + "y": -24965.610908381394, + "width": 422, + "height": 402, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB3", + "roundness": { + "type": 2 + }, + "seed": 1170719619, + "version": 182, + "versionNonce": 1271896269, + "isDeleted": false, + "boundElements": [], + "updated": 1736530165016, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 222, + -174 + ], + [ + 422, + -402 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "_cboxl_GwJ0e24ivs-3JG", + "type": "text", + "x": -2641.8595629637384, + "y": -25055.610908381394, + "width": 209.3040771484375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB4", + "roundness": null, + "seed": 1873435427, + "version": 92, + "versionNonce": 479384995, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084062, + "link": null, + "locked": false, + "text": "MinCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MinCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "Cak5jn9057K3Xtr-wNjBO", + "type": "text", + "x": -2146.511601537957, + "y": -25008.110908381394, + "width": 228.85208129882812, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bB5", + "roundness": null, + "seed": 1553530563, + "version": 141, + "versionNonce": 2072914243, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084062, + "link": null, + "locked": false, + "text": "MaxCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MaxCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "fK_vtRZkJMS1xL_TXFl8o", + "type": "text", + "x": -1187.4216052000666, + "y": -24908.110908381394, + "width": 262.008056640625, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBB", + "roundness": null, + "seed": 1777979523, + "version": 116, + "versionNonce": 1387076355, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084062, + "link": null, + "locked": false, + "text": "block version 3", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "block version 3", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "8jQoSu17xiWIBytzGGIUL", + "type": "arrow", + "x": -1205.8595629637384, + "y": -24923.610908381394, + "width": 174, + "height": 438, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBC", + "roundness": { + "type": 2 + }, + "seed": 1007863843, + "version": 172, + "versionNonce": 945495043, + "isDeleted": false, + "boundElements": [], + "updated": 1736530188812, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + -168, + -122 + ], + [ + -174, + -438 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "XOlbmNNY4lVa1ro6P3h8E", + "type": "text", + "x": -1298.5116015379572, + "y": -25046.110908381394, + "width": 209.3040771484375, + "height": 45, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBD", + "roundness": null, + "seed": 996920259, + "version": 138, + "versionNonce": 179205699, + "isDeleted": false, + "boundElements": [], + "updated": 1736530084062, + "link": null, + "locked": false, + "text": "MinCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "MinCommitId", + "autoResize": true, + "lineHeight": 1.25 + }, + { + "id": "-dEKPS3cnf2FlNPoN_8ju", + "type": "arrow", + "x": -2505.3435336058283, + "y": -27658.691102233468, + "width": 218, + "height": 0, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBE", + "roundness": null, + "seed": 348323469, + "version": 39, + "versionNonce": 188516771, + "isDeleted": false, + "boundElements": null, + "updated": 1736530105010, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 218, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "Fh0_JpJ2IZdcPXthnTlR4", + "type": "arrow", + "x": -1936.3435336058283, + "y": -27666.97266151853, + "width": 130, + "height": 2, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBF", + "roundness": null, + "seed": 1281379437, + "version": 120, + "versionNonce": 708607715, + "isDeleted": false, + "boundElements": [], + "updated": 1736530113033, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 130, + -2 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "2H69g_AVL6W5Y6nSaapk3", + "type": "arrow", + "x": -1646.3435336058283, + "y": -27703.691102233468, + "width": 276, + "height": 4, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBG", + "roundness": null, + "seed": 266826541, + "version": 215, + "versionNonce": 1797954275, + "isDeleted": false, + "boundElements": [], + "updated": 1736530120883, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 276, + -4 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "CRh1djUE_u0m0GY8VwyT0", + "type": "arrow", + "x": -1499.3435336058283, + "y": -27642.6090896381, + "width": 134, + "height": 0, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBH", + "roundness": null, + "seed": 784542093, + "version": 258, + "versionNonce": 566552493, + "isDeleted": false, + "boundElements": [], + "updated": 1736530130748, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 134, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "VC08Miqyh2SyiLjOc4QPB", + "type": "arrow", + "x": -1404.3435336058283, + "y": -27592.75506222414, + "width": 36, + "height": 0, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBI", + "roundness": null, + "seed": 1936181571, + "version": 309, + "versionNonce": 1790032685, + "isDeleted": false, + "boundElements": [], + "updated": 1736530137320, + "link": null, + "locked": false, + "points": [ + [ + 0, + 0 + ], + [ + 36, + 0 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": null, + "startArrowhead": null, + "endArrowhead": "arrow", + "elbowed": false + }, + { + "id": "105gOrLatGw-MvGsOMGap", + "type": "text", + "x": -2617.2378207152033, + "y": -24724.691102233468, + "width": 2055.78857421875, + "height": 225, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "transparent", + "fillStyle": "solid", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "frameId": null, + "index": "bBJ", + "roundness": null, + "seed": 505680493, + "version": 3148, + "versionNonce": 968105219, + "isDeleted": false, + "boundElements": [], + "updated": 1736530285269, + "link": null, + "locked": false, + "text": "After the rebase operation:\n* block version 1 has MinCommitId == Checkpoint1, MaxCommitId == Checkpoint2 (visible in Checkpoint1, not visible in\nafter that)\n* block version 2 got deleted because after CommitId update its MinCommitId became equal to its MaxCommitId\n* block version 3 has MinCommitId == LastCommitId", + "fontSize": 36, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "After the rebase operation:\n* block version 1 has MinCommitId == Checkpoint1, MaxCommitId == Checkpoint2 (visible in Checkpoint1, not visible in\nafter that)\n* block version 2 got deleted because after CommitId update its MinCommitId became equal to its MaxCommitId\n* block version 3 has MinCommitId == LastCommitId", + "autoResize": false, + "lineHeight": 1.25 + } + ], + "appState": { + "gridSize": 20, + "gridStep": 5, + "gridModeEnabled": false, + "viewBackgroundColor": "#ffffff" + }, + "files": {} +} \ No newline at end of file diff --git a/doc/filestore/excalidraw/mixed_blocks_rebase_logic.svg b/doc/filestore/excalidraw/mixed_blocks_rebase_logic.svg new file mode 100644 index 0000000000..f8dbf5d7cf --- /dev/null +++ b/doc/filestore/excalidraw/mixed_blocks_rebase_logic.svg @@ -0,0 +1,2 @@ +NodeId1MinCommitId1BlockCount1BlockIndex1BlobOffset1NodeId2MinCommitId2BlockCount2BlockIndex2BlobOffset2NodeIdNMinCommitIdNBlockCountNBlockIndexNBlobOffsetN...NodeId1MaxCommitId1BlobOffset1NodeId2MaxCommitId2BlobOffset2NodeIdNMaxCommitIdNBlobOffsetN...BlockListBlocks stored in a MixedBlob are described by "BlockList" structures. BlockList stores the following infoabout each block stored in the blob:* NodeId* MinCommitId and MaxCommitId* BlockIndex* Offset in blobSo there is a lot of metadata to store per block. To minimize the physical size of the metadata, we tryto compress it by:* storing MaxCommitIds separately from MinCommitIds* grouping the data in each of those 2 structures by NodeId, then by CommitId and store ranges insteadof individual block infos per each <NodeId,CommitId> pair:Note: if BlockCount == 1, then this field is omitted.Rebase logicGrouping by NodeId is easy - if we store multiple blocks per Node in a single blob (we try to store 64 blocksper Node in each blob - see the data index docs), then NodeId will be written only once for all blocks. ButCommitIds will be different for all blocks if a file is written block by block. To make as many CommitIds equalto each other as possible, our background operations actually modify the original CommitIds - it's called"rebase" in the code. We need CommitIds to know which block versions should be observable at a specific point in time (CommitId is alogical point in time) and which shouldn't. The points in time which are of interest for us are:* LastCommitId - i.e. "now"* CheckpointCommitIdsIf a version of a block has MinCommitId <= CheckpointCommitId and MaxCommitId > CheckpointCommitId, then itshould be observable at CheckpointCommitId, otherwise - it shouldn't. As for LastCommitId - all blocks whoseMaxCommitId == InvalidCommitId should be observable at LastCommitId, blocks with valid MaxCommitId - shouldn't.So we can increment block CommitIds without changing the observability of block versions as long as we don't moveCommitId past the next CheckpointCommitId.The rebase logic simply updates block CommitIds by making them equal to the first CheckpointCommitId which is notless than the CommitId of the block. If all CheckpointCommitIds are smaller than block CommitId, we just setblock CommitId to be equal to LastCommitId. It makes most of the CommitIds in a blob equal to each other.CommitIdCheckpoint1Checkpoint2LastCommitIdblock version1MinCommitIdMaxCommitIdblock version 2MinCommitIdMaxCommitIdblock version 3MinCommitIdIn this example we have 3 versions of the same block:* version 1 was created before Checkpoint1 and deleted before Checkpoint2* version 2 was created after Checkpoint2 and deleted after that* version 3 was created after the deletion of version 2 and wasn't deleted CommitIdCheckpoint1Checkpoint2LastCommitIdblock version1MinCommitIdMaxCommitIdblock version 3MinCommitIdAfter the rebase operation:* block version 1 has MinCommitId == Checkpoint1, MaxCommitId == Checkpoint2 (visible in Checkpoint1, not visible inafter that)* block version 2 got deleted because after CommitId update its MinCommitId became equal to its MaxCommitId* block version 3 has MinCommitId == LastCommitId \ No newline at end of file