From 84bf4618b4c10a294621d1858d3c97abff0b0b7e Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 22 Apr 2023 10:26:51 +0800 Subject: [PATCH] :art: Data repo support for purging unreferenced indexes and objects https://github.com/siyuan-note/siyuan/issues/8054 --- .../20210615213222-vs5tzbd.sy | 201 ++++++++++++++++-- .../20210615211733-v6rzowm.sy | 193 +++++++++++++++-- .../20211226122707-8cr09co.sy | 175 +++++++++++++-- 3 files changed, 525 insertions(+), 44 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy index 485e02c123c..94a841ee466 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20210615213222-vs5tzbd", "title": "Data history", - "updated": "20230403114455" + "updated": "20230422102255" }, "Children": [ { @@ -1427,12 +1427,12 @@ "HeadingLevel": 3, "Properties": { "id": "20220615120602-nzrp6gt", - "updated": "20220615120602" + "updated": "20230422102109" }, "Children": [ { "Type": "NodeText", - "Data": "Browse data snapshots" + "Data": "Browse data snapshot" } ] }, @@ -1485,35 +1485,200 @@ "HeadingLevel": 3, "Properties": { "id": "20220615120602-nhnnujh", - "updated": "20220615120602" + "updated": "20230422102056" }, "Children": [ { "Type": "NodeText", - "Data": "Clean data snapshot" + "Data": "Cleanup data snapshot" } ] }, { - "ID": "20220615120602-f90cll0", - "Type": "NodeParagraph", + "ID": "20230422101614-mdijztr", + "Type": "NodeList", + "ListData": {}, "Properties": { - "id": "20220615120602-f90cll0", - "updated": "20220615120602" + "id": "20230422101614-mdijztr", + "updated": "20230422102255" }, "Children": [ { - "Type": "NodeText", - "Data": "Manually deleting the " - }, - { - "Type": "NodeTextMark", - "TextMarkType": "code", - "TextMarkTextContent": "workspace/repo/" + "ID": "20230422101614-5lwp8u3", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101614-5lwp8u3", + "updated": "20230422102255" + }, + "Children": [ + { + "ID": "20230422101614-5kvwhn7", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101614-5kvwhn7", + "updated": "20230422102255" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "Settings" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "About" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "Data repo purge" + }, + { + "Type": "NodeText", + "Data": "​ will delete all unreferenced snapshots and related data objects. \"Referenced snapshots\" refer to snapshots pointed to under repo/refs/:" + } + ] + }, + { + "ID": "20230422101614-ibwplih", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20230422101614-ibwplih", + "updated": "20230422102025" + }, + "Children": [ + { + "ID": "20230422101614-wqxklla", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101614-wqxklla", + "updated": "20230422102025" + }, + "Children": [ + { + "ID": "20230422101614-uwv2229", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101614-uwv2229", + "updated": "20230422102025" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "latest" + }, + { + "Type": "NodeText", + "Data": "​ points to the latest snapshot" + } + ] + } + ] + }, + { + "ID": "20230422101614-tgrdynv", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101614-tgrdynv", + "updated": "20230422102023" + }, + "Children": [ + { + "ID": "20230422101614-tf542fs", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101614-tf542fs", + "updated": "20230422102023" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "tags/*" + }, + { + "Type": "NodeText", + "Data": "​ point to manually tagged snapshots" + } + ] + } + ] + } + ] + } + ] }, { - "Type": "NodeText", - "Data": " folder will clear all data snapshots." + "ID": "20230422101614-ht2yhm0", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101614-ht2yhm0", + "updated": "20230422101614" + }, + "Children": [ + { + "ID": "20230422101614-lxjcg2j", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101614-lxjcg2j", + "updated": "20230422101614" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "Manually delete the " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "workspace/repo/" + }, + { + "Type": "NodeText", + "Data": "​ folder to clear all data snapshots" + } + ] + } + ] } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy index 16e284eaf09..ab084a32eed 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20210615211733-v6rzowm", "title": "数据历史", - "updated": "20230403114310" + "updated": "20230422102226" }, "Children": [ { @@ -1498,24 +1498,193 @@ }, { "ID": "20220615115758-ajl5l83", - "Type": "NodeParagraph", + "Type": "NodeList", + "ListData": {}, "Properties": { "id": "20220615115758-ajl5l83", - "updated": "20220615115831" + "updated": "20230422102226" }, "Children": [ { - "Type": "NodeText", - "Data": "手动删除 " - }, - { - "Type": "NodeTextMark", - "TextMarkType": "code", - "TextMarkTextContent": "工作空间/repo/" + "ID": "20230422101107-ihb3kxp", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101107-ihb3kxp", + "updated": "20230422102226" + }, + "Children": [ + { + "ID": "20230422101107-zxq6qh2", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101107-zxq6qh2", + "updated": "20230422102226" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "设置" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "关于" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "数据仓库清理" + }, + { + "Type": "NodeText", + "Data": "​ 将删除所有未引用的快照和相关数据对象。“引用的快照”指的是 repo/refs/ 下指向的快照:" + } + ] + }, + { + "ID": "20230422101343-wvt2y4r", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20230422101343-wvt2y4r", + "updated": "20230422101936" + }, + "Children": [ + { + "ID": "20230422101343-obxopx6", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101343-obxopx6", + "updated": "20230422101934" + }, + "Children": [ + { + "ID": "20230422101343-f5w2p8p", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101343-f5w2p8p", + "updated": "20230422101934" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "latest" + }, + { + "Type": "NodeText", + "Data": "​ 指向最新一个快照" + } + ] + } + ] + }, + { + "ID": "20230422101357-4ugrbw1", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101357-4ugrbw1", + "updated": "20230422101936" + }, + "Children": [ + { + "ID": "20230422101357-istm02i", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101357-istm02i", + "updated": "20230422101936" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "tags/*" + }, + { + "Type": "NodeText", + "Data": "​ 指向手动标记的快照" + } + ] + } + ] + } + ] + } + ] }, { - "Type": "NodeText", - "Data": " 文件夹可以清空全部数据快照。" + "ID": "20230422101105-vdd9m4g", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422101105-vdd9m4g", + "updated": "20230422101105" + }, + "Children": [ + { + "ID": "20230422101105-0csmuf6", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422101105-0csmuf6", + "updated": "20230422101106" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "手动删除 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "工作空间/repo/" + }, + { + "Type": "NodeText", + "Data": "​​ 文件夹可以清空全部" + }, + { + "Type": "NodeText", + "Data": "数据快照" + } + ] + } + ] } ] }, diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122707-8cr09co.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122707-8cr09co.sy index 11c2c0cb44c..c1c35cede87 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122707-8cr09co.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122707-8cr09co.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20211226122707-8cr09co", "title": "數據歷史", - "updated": "20230403114139" + "updated": "20230422102220" }, "Children": [ { @@ -1491,25 +1491,172 @@ ] }, { - "ID": "20220615120134-jrz9hxj", - "Type": "NodeParagraph", + "ID": "20230422102151-dz30xx1", + "Type": "NodeList", + "ListData": {}, "Properties": { - "id": "20220615120134-jrz9hxj", - "updated": "20220615120134" + "id": "20230422102151-dz30xx1", + "updated": "20230422102220" }, "Children": [ { - "Type": "NodeText", - "Data": "手動刪除 " - }, - { - "Type": "NodeTextMark", - "TextMarkType": "code", - "TextMarkTextContent": "工作空間/repo/" + "ID": "20230422102151-cvrozwk", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422102151-cvrozwk", + "updated": "20230422102220" + }, + "Children": [ + { + "ID": "20230422102151-21jkic1", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422102151-21jkic1", + "updated": "20230422102220" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "​" + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "設置" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "關於" + }, + { + "Type": "NodeText", + "Data": "​ - " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "kbd", + "TextMarkTextContent": "數據倉庫清理" + }, + { + "Type": "NodeText", + "Data": "​ 將刪除所有未引用的快照和相關數據對象。“引用的快照”指的是 repo/refs/ 下指向的快照:" + } + ] + }, + { + "ID": "20230422102151-coegnkg", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20230422102151-coegnkg", + "updated": "20230422102151" + }, + "Children": [ + { + "ID": "20230422102151-tp5gphi", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422102151-tp5gphi", + "updated": "20230422102151" + }, + "Children": [ + { + "ID": "20230422102151-patjhoy", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422102151-patjhoy", + "updated": "20230422102151" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "latest 指向最新一個快照" + } + ] + } + ] + }, + { + "ID": "20230422102151-juzvfzd", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422102151-juzvfzd", + "updated": "20230422102151" + }, + "Children": [ + { + "ID": "20230422102151-s1d7n8h", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422102151-s1d7n8h", + "updated": "20230422102151" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "tags/* 指向手動標記的快照" + } + ] + } + ] + } + ] + } + ] }, { - "Type": "NodeText", - "Data": " 文件夾可以清空全部數據快照。" + "ID": "20230422102151-m9pt89m", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20230422102151-m9pt89m", + "updated": "20230422102151" + }, + "Children": [ + { + "ID": "20230422102151-9b7anw1", + "Type": "NodeParagraph", + "Properties": { + "id": "20230422102151-9b7anw1", + "updated": "20230422102151" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "手動刪除 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "工作空間/repo/" + }, + { + "Type": "NodeText", + "Data": "​ 文件夾可以清空全部數據快照" + } + ] + } + ] } ] },