From 7ab6d6c3f8234d72b9b3898dffd9fe5a69ae68de Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 16:45:23 +0800 Subject: [PATCH 01/10] :arrow_up: Upgrade kernel deps --- kernel/go.mod | 6 +++--- kernel/go.sum | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 6d11a443f..a0f3c7602 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -35,7 +35,7 @@ require ( github.com/goccy/go-json v0.10.2 github.com/gofrs/flock v0.8.1 github.com/gorilla/websocket v1.5.1 - github.com/imroc/req/v3 v3.42.1 + github.com/imroc/req/v3 v3.42.2 github.com/jinzhu/copier v0.4.0 github.com/json-iterator/go v1.1.12 github.com/klippa-app/go-pdfium v1.8.2 @@ -50,11 +50,11 @@ require ( github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 github.com/sashabaranov/go-openai v1.17.6 github.com/shirou/gopsutil/v3 v3.23.10 - github.com/siyuan-note/dejavu v0.0.0-20231119064743-97ed128527a4 + github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278 github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a - github.com/siyuan-note/httpclient v0.0.0-20231114005512-c39c76a8c333 + github.com/siyuan-note/httpclient v0.0.0-20231120083123-750db4d28b38 github.com/siyuan-note/logging v0.0.0-20231030034701-8265764f00ff github.com/siyuan-note/riff v0.0.0-20231106140614-c67ff0c69e33 github.com/steambap/captcha v1.4.1 diff --git a/kernel/go.sum b/kernel/go.sum index 384a3ca2b..fd20e5182 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -202,6 +202,8 @@ github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/imroc/req/v3 v3.42.1 h1:g82SouLvX7pqwqJjpQJYrVvuI+LOycWhyuwxtLlyQJk= github.com/imroc/req/v3 v3.42.1/go.mod h1:W7dOrfQORA9nFoj+CafIZ6P5iyk+rWdbp2sffOAvABU= +github.com/imroc/req/v3 v3.42.2 h1:/BwrKXGR7X1/ptccaQAiziDCeZ7T6ye55g3ZhiLy1fc= +github.com/imroc/req/v3 v3.42.2/go.mod h1:W7dOrfQORA9nFoj+CafIZ6P5iyk+rWdbp2sffOAvABU= github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056 h1:iCHtR9CQyktQ5+f3dMVZfwD2KWJUgm7M0gdL9NGr8KA= github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= @@ -358,6 +360,8 @@ github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05Ut github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= github.com/siyuan-note/dejavu v0.0.0-20231119064743-97ed128527a4 h1:BqFBEcUGZyMvZjHgftEXaxMkPy0NiDb6F7GKJVPuMrg= github.com/siyuan-note/dejavu v0.0.0-20231119064743-97ed128527a4/go.mod h1:g8x1cYUKzmvrjuV/EcTeb7EQmgWIYBZlRiDtM1TtNhI= +github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278 h1:TXQ0n4ZGfhJ8pXehMea01AbAvnLCK/M4CuHzS6GPRCA= +github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278/go.mod h1:kvFQAGwX1o1eKPyn3c+ftsN5yqliSpalA057MIwHnDs= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw= github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 h1:XghjHKJd+SiL0DkGYFVC+UGUDFtnR4v9gkAbPeh9Eq8= @@ -366,6 +370,8 @@ github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a h1:fNWhSpB+e0 github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a/go.mod h1:HjtfP1NLDw53BRSeAPJgZDIGqyxi4bANYn1IhgDCQUY= github.com/siyuan-note/httpclient v0.0.0-20231114005512-c39c76a8c333 h1:IelcK7j2VVNeiU9ta/B7JsohG+wzGXT2iO25oQVmP7A= github.com/siyuan-note/httpclient v0.0.0-20231114005512-c39c76a8c333/go.mod h1:yiR/Uml8/YF9a/m7P2Fb7MlYNXSXX9peWTuPggGddB4= +github.com/siyuan-note/httpclient v0.0.0-20231120083123-750db4d28b38 h1:deUrbUOwmsNYRT0x12GHaJ8exxmDMwXFL/1J4dVnLMM= +github.com/siyuan-note/httpclient v0.0.0-20231120083123-750db4d28b38/go.mod h1:QOTSBBSeKU90Kb4aeDVcQ0G+2zJcNuhkwAlsJ2cnmkQ= github.com/siyuan-note/logging v0.0.0-20231030034701-8265764f00ff h1:5GcxrTOJTsusXOLhg4GuHWbEa4M5gu+CNfL0giwNjDM= github.com/siyuan-note/logging v0.0.0-20231030034701-8265764f00ff/go.mod h1:6mRFtAAvYPn3cDzqvyv+t8BVPGqpONDMMb5ywOhY1D4= github.com/siyuan-note/riff v0.0.0-20231106140614-c67ff0c69e33 h1:oEJoBL0ZSDwKckZcS37zMuIsPplTnN1aHz+04700P2o= From a54dd1253330fb09df658e283fdc303e59b00364 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 17:50:39 +0800 Subject: [PATCH 02/10] :art: Add index serving log --- kernel/server/serve.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/server/serve.go b/kernel/server/serve.go index 2dd9b3f7c..41c7ab4fd 100644 --- a/kernel/server/serve.go +++ b/kernel/server/serve.go @@ -208,8 +208,9 @@ func serveAppearance(ginServer *gin.Engine) { siyuan.Handle("GET", "/", func(c *gin.Context) { userAgentHeader := c.GetHeader("User-Agent") + logging.LogInfof("serving [/] for user-agent [%s]", userAgentHeader) - /* Carry query parameters when redirecting */ + // Carry query parameters when redirecting location := url.URL{} queryParams := c.Request.URL.Query() queryParams.Set("r", gulu.Rand.String(7)) From 9dfc35e1ac54f8e6a97d140eb0b8c6a28de785fb Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:11:28 +0800 Subject: [PATCH 03/10] :art: Supports configuring data sync index time-consuming prompts https://github.com/siyuan-note/siyuan/issues/9698 --- kernel/conf/repo.go | 9 ++++++++- kernel/model/conf.go | 9 +++++++++ kernel/model/repository.go | 3 +-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/kernel/conf/repo.go b/kernel/conf/repo.go index 7a4b6f107..6feffba78 100644 --- a/kernel/conf/repo.go +++ b/kernel/conf/repo.go @@ -24,10 +24,17 @@ import ( type Repo struct { Key []byte `json:"key"` // AES 密钥 + + // 同步索引计时,单位毫秒,超过该时间则提示用户索引性能下降 + // If the data repo indexing time is greater than 7s, prompt user to purge the data repo https://github.com/siyuan-note/siyuan/issues/9613 + // Supports configuring data sync index time-consuming prompts https://github.com/siyuan-note/siyuan/issues/9698 + SyncIndexTiming int64 `json:"syncIndexTiming"` } func NewRepo() *Repo { - return &Repo{} + return &Repo{ + SyncIndexTiming: 7 * 1000, + } } func (*Repo) GetSaveDir() string { diff --git a/kernel/model/conf.go b/kernel/model/conf.go index e2aa41709..1d3f3fd64 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -325,6 +325,15 @@ func InitConf() { if nil == Conf.Repo { Conf.Repo = conf.NewRepo() } + if timingEnv := os.Getenv("SIYUAN_SYNC_INDEX_TIMING"); "" != timingEnv { + val, err := strconv.Atoi(timingEnv) + if nil == err { + Conf.Repo.SyncIndexTiming = int64(val) + } + } + if 7000 > Conf.Repo.SyncIndexTiming { + Conf.Repo.SyncIndexTiming = 7 * 1000 + } if nil == Conf.Search { Conf.Search = conf.NewSearch() diff --git a/kernel/model/repository.go b/kernel/model/repository.go index a283ebea6..bc14ef8a7 100644 --- a/kernel/model/repository.go +++ b/kernel/model/repository.go @@ -1485,8 +1485,7 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (beforeIndex, afterIndex *entit util.PushStatusBar(fmt.Sprintf(Conf.Language(148), elapsed.Seconds())) } - if 7000 < elapsed.Milliseconds() { - // If the data repo indexing time is greater than 7s, prompt user to purge the data repo https://github.com/siyuan-note/siyuan/issues/9613 + if Conf.Repo.SyncIndexTiming < elapsed.Milliseconds() { logging.LogWarnf("index data repo before cloud sync elapsed [%dms]", elapsed.Milliseconds()) if !promotedPurgeDataRepo { go func() { From e11c7209444d99b87097c16082fd1fac85e39a7c Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:12:31 +0800 Subject: [PATCH 04/10] :memo: Update changelogs --- app/changelogs/v2.10.16/v2.10.16.md | 1 + app/changelogs/v2.10.16/v2.10.16_zh_CHT.md | 1 + app/changelogs/v2.10.16/v2.10.16_zh_CN.md | 1 + 3 files changed, 3 insertions(+) diff --git a/app/changelogs/v2.10.16/v2.10.16.md b/app/changelogs/v2.10.16/v2.10.16.md index f5ab86f1a..32a644ac4 100644 --- a/app/changelogs/v2.10.16/v2.10.16.md +++ b/app/changelogs/v2.10.16/v2.10.16.md @@ -36,6 +36,7 @@ Below are the detailed changes in this version. * [Improve delete interaction when cursor is in front of inline code](https://github.com/siyuan-note/siyuan/issues/9690) * [Force using discrete GPU when there are multiple GPUs available on the desktop](https://github.com/siyuan-note/siyuan/issues/9694) * [Support set Chromium command line arguments on the desktop](https://github.com/siyuan-note/siyuan/issues/9696) +* [Supports configuring data sync index time-consuming prompts](https://github.com/siyuan-note/siyuan/issues/9698) ### Document diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md index e515fb06f..348c45c47 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md @@ -36,6 +36,7 @@ * [改進行級程式碼前刪除的互動](https://github.com/siyuan-note/siyuan/issues/9690) * [桌面端多顯示卡可用時預設使用獨立顯示卡](https://github.com/siyuan-note/siyuan/issues/9694) * [桌面端支援設定 Chromium 命令列參數](https://github.com/siyuan-note/siyuan/issues/9696) +* [支援設定資料同步索引耗時提示](https://github.com/siyuan-note/siyuan/issues/9698) ### 改進文檔 diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md index 7b6267d28..893583042 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md @@ -36,6 +36,7 @@ * [改进行级代码前删除的交互](https://github.com/siyuan-note/siyuan/issues/9690) * [桌面端多显卡可用时默认使用独立显卡](https://github.com/siyuan-note/siyuan/issues/9694) * [桌面端支持设置 Chromium 命令行参数](https://github.com/siyuan-note/siyuan/issues/9696) +* [支持配置数据同步索引耗时提示](https://github.com/siyuan-note/siyuan/issues/9698) ### 改进文档 From f38dc1281ac5c71a33f55dc9220bb3a211a7c565 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:35:38 +0800 Subject: [PATCH 05/10] :art: Update data sync notes in the user guide https://github.com/siyuan-note/siyuan/issues/9699 --- .../20210721112206-mhr9wxi.sy | 216 +++++++++++++++++- .../20230808120347-3cob0nb.sy | 177 +++++++++++++- .../20211226121438-xaafdo8.sy | 187 ++++++++++++++- 3 files changed, 571 insertions(+), 9 deletions(-) diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy index c9079305c..bdbf62979 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20230805231614-vqn28eh/20210808180303-v9awwp0/20210721112206-mhr9wxi.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20210721112206-mhr9wxi", "title": "Data sync", - "updated": "20230713213257" + "updated": "20231120213154" }, "Children": [ { @@ -1139,7 +1139,7 @@ "ListData": {}, "Properties": { "id": "20210721112403-th2r6zf", - "updated": "20220807180100" + "updated": "20231120213154" }, "Children": [ { @@ -1164,7 +1164,23 @@ "Children": [ { "Type": "NodeText", - "Data": "Synchronization will not be triggered in the case of sudden disconnection such as sleep or shutdown, please manually click the synchronization button to synchronize" + "Data": "Synchronization will not be triggered in the case " + }, + { + "Type": "NodeText", + "Data": "of" + }, + { + "Type": "NodeText", + "Data": " sudden disconnection such " + }, + { + "Type": "NodeText", + "Data": "as" + }, + { + "Type": "NodeText", + "Data": " sleep or shutdown, please manually click the synchronization button to synchronize" } ] } @@ -1192,7 +1208,27 @@ "Children": [ { "Type": "NodeText", - "Data": "Do not use a third-party sync disk and SiYuan sync at the same time, it may cause data damage" + "Data": "Do" + }, + { + "Type": "NodeText", + "Data": " not use a third-party sync disk and " + }, + { + "Type": "NodeText", + "Data": "SiYuan" + }, + { + "Type": "NodeText", + "Data": " sync " + }, + { + "Type": "NodeText", + "Data": "at" + }, + { + "Type": "NodeText", + "Data": " the same time, it may cause data damage" } ] } @@ -1225,6 +1261,178 @@ ] } ] + }, + { + "ID": "20231120213145-qvushc7", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213145-qvushc7" + }, + "Children": [ + { + "ID": "20231120213145-xe9nogq", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213145-xe9nogq", + "updated": "20231120213148" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "In the automatic synchronization mode, if you need to exit, please use the normal exit method (for example, do not use sliding to remove on the mobile APP, do not use the end process to force close on the desktop) to ensure data sync" + } + ] + } + ] + }, + { + "ID": "20231120213153-tpjbi5o", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213153-tpjbi5o", + "updated": "20231120213154" + }, + "Children": [ + { + "ID": "20231120213154-sjzx64a", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213154-sjzx64a", + "updated": "20231120213154" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "If the data snapshot takes more than 7 seconds before data synchronization, you will be prompted to clean up the data warehouse. If you need to change the default time, you can use the following two methods." + } + ] + }, + { + "ID": "20231120213154-llmdq2d", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20231120213154-llmdq2d", + "updated": "20231120213154" + }, + "Children": [ + { + "ID": "20231120213154-04v43ak", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213154-04v43ak", + "updated": "20231120213154" + }, + "Children": [ + { + "ID": "20231120213154-s3auhbe", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213154-s3auhbe", + "updated": "20231120213154" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "Environment variable " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING" + }, + { + "Type": "NodeText", + "Data": "​, for example " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING=30000" + }, + { + "Type": "NodeText", + "Data": "​, the unit is milliseconds" + } + ] + } + ] + }, + { + "ID": "20231120213154-vbz394m", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213154-vbz394m", + "updated": "20231120213154" + }, + "Children": [ + { + "ID": "20231120213154-j43r82y", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213154-j43r82y", + "updated": "20231120213154" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "Directly modify " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "repo.syncIndexTiming" + }, + { + "Type": "NodeText", + "Data": "​ in workspace/conf/conf.json" + } + ] + } + ] + } + ] + }, + { + "ID": "20231120213154-aoykqw3", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213154-aoykqw3", + "updated": "20231120213154" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "The minimum value can only be configured to " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "7000" + }, + { + "Type": "NodeText", + "Data": "​ (7 seconds), and the maximum value is not limited; when starting, environment variables will be read first to overwrite the values in the conf file." + } + ] + } + ] } ] } diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy index 614307a4b..063d7bb62 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20230805222417-2lj3dvk/20230808120348-orm8sjf/20230808120347-3cob0nb.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20230808120347-3cob0nb", "title": "数据同步", - "updated": "20230220103623" + "updated": "20231120213300" }, "Children": [ { @@ -1150,7 +1150,7 @@ "ListData": {}, "Properties": { "id": "20230808120347-um16u4f", - "updated": "20220807180028" + "updated": "20231120213300" }, "Children": [ { @@ -1236,6 +1236,179 @@ ] } ] + }, + { + "ID": "20231120211520-p8tb9wg", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120211520-p8tb9wg", + "updated": "20231120213300" + }, + "Children": [ + { + "ID": "20231120211520-1xtrwfh", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120211520-1xtrwfh", + "updated": "20231120213300" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "自动同步模式下,如需退出,请使用正常的退出应用(比如移动端 APP 不要使用滑动移除,桌面端不要使用结束进程强制关闭)方式以保证数据同步执行" + } + ] + } + ] + }, + { + "ID": "20231120211807-pzxmsee", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120211807-pzxmsee", + "updated": "20231120212111" + }, + "Children": [ + { + "ID": "20231120211807-n24g7wl", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120211807-n24g7wl", + "updated": "20231120211921" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "数据同步前进行数据快照如果耗时超过 7 秒会提示清理数据仓库,如果需要改动默认耗时,可通过如下两种方式" + } + ] + }, + { + "ID": "20231120211944-fvla0hc", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20231120211944-fvla0hc", + "updated": "20231120212046" + }, + "Children": [ + { + "ID": "20231120211944-ol64svy", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120211944-ol64svy", + "updated": "20231120211944" + }, + "Children": [ + { + "ID": "20231120211944-4edb9kx", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120211944-4edb9kx", + "updated": "20231120211944" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "环境变量 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING" + }, + { + "Type": "NodeText", + "Data": "​,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING=30000" + }, + { + "Type": "NodeText", + "Data": "​,单位是毫秒" + } + ] + } + ] + }, + { + "ID": "20231120211944-5yhw1vi", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120211944-5yhw1vi", + "updated": "20231120212046" + }, + "Children": [ + { + "ID": "20231120211944-chb1tvm", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120211944-chb1tvm", + "updated": "20231120212046" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "直接修改 工作空间/conf/conf.json 中的 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "repo.syncIndexTiming" + }, + { + "Type": "NodeText", + "Data": "​" + } + ] + } + ] + } + ] + }, + { + "ID": "20231120211944-m955a64", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120211944-m955a64", + "updated": "20231120212111" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "最小值只能配置为 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "7000" + }, + { + "Type": "NodeText", + "Data": "​(7 秒),最大值不限制;启动时会优先读取环境变量覆盖 conf 文件中的值。" + } + ] + } + ] } ] } diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy index 502cba467..44c1a0596 100644 --- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy +++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20230805232636-zh0adz2/20211226121232-23s79xr/20211226121438-xaafdo8.sy @@ -5,7 +5,7 @@ "Properties": { "id": "20211226121438-xaafdo8", "title": "資料同步", - "updated": "20230630142312" + "updated": "20231120213316" }, "Children": [ { @@ -1143,7 +1143,7 @@ "ListData": {}, "Properties": { "id": "20211226121454-kv5itch", - "updated": "20220807180200" + "updated": "20231120213316" }, "Children": [ { @@ -1196,7 +1196,15 @@ "Children": [ { "Type": "NodeText", - "Data": "請勿同時使用第三方同步碟和思源同步,可能會導致資料損壞" + "Data": "請勿同時使用第三方同步碟和" + }, + { + "Type": "NodeText", + "Data": "思源" + }, + { + "Type": "NodeText", + "Data": "同步,可能會導致資料損壞" } ] } @@ -1229,6 +1237,179 @@ ] } ] + }, + { + "ID": "20231120213057-gojar0n", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213057-gojar0n", + "updated": "20231120213316" + }, + "Children": [ + { + "ID": "20231120213057-v754ak8", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213057-v754ak8", + "updated": "20231120213316" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "自動同步模式下,如需退出,請使用正常的退出應用(例如行動端 APP 不要使用滑動移除,桌面端不要使用結束程序強制關閉)方式以確保資料同步執行" + } + ] + } + ] + }, + { + "ID": "20231120213105-95jggay", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213105-95jggay", + "updated": "20231120213106" + }, + "Children": [ + { + "ID": "20231120213106-0hx9knh", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213106-0hx9knh", + "updated": "20231120213106" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "資料同步前進行資料快照如果耗時超過 7 秒會提示清理資料倉儲,若需要變更預設耗時,可透過以下兩種方式" + } + ] + }, + { + "ID": "20231120213106-kbnm4po", + "Type": "NodeList", + "ListData": {}, + "Properties": { + "id": "20231120213106-kbnm4po", + "updated": "20231120213106" + }, + "Children": [ + { + "ID": "20231120213106-qr96es4", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213106-qr96es4", + "updated": "20231120213106" + }, + "Children": [ + { + "ID": "20231120213106-6m5igg4", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213106-6m5igg4", + "updated": "20231120213106" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "環境變數 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING" + }, + { + "Type": "NodeText", + "Data": "​,例如 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "SIYUAN_SYNC_INDEX_TIMING=30000" + }, + { + "Type": "NodeText", + "Data": "​,單位是毫秒" + } + ] + } + ] + }, + { + "ID": "20231120213106-d3jyt3j", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20231120213106-d3jyt3j", + "updated": "20231120213106" + }, + "Children": [ + { + "ID": "20231120213106-jnkaa0w", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213106-jnkaa0w", + "updated": "20231120213106" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "直接修改 工作空間/conf/conf.json 中的 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "repo.syncIndexTiming" + }, + { + "Type": "NodeText", + "Data": "​" + } + ] + } + ] + } + ] + }, + { + "ID": "20231120213106-56yd2us", + "Type": "NodeParagraph", + "Properties": { + "id": "20231120213106-56yd2us", + "updated": "20231120213106" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "最小值只能配置為 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "7000" + }, + { + "Type": "NodeText", + "Data": "​(7 秒),最大值不限制;啟動時會優先讀取環境變數覆蓋 conf 檔案中的值。" + } + ] + } + ] } ] } From 72aca7e9e3224bceb425d9f605e15a8500e7279f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:37:39 +0800 Subject: [PATCH 06/10] :memo: Update changelogs --- app/changelogs/v2.10.16/v2.10.16.md | 1 + app/changelogs/v2.10.16/v2.10.16_zh_CHT.md | 1 + app/changelogs/v2.10.16/v2.10.16_zh_CN.md | 1 + 3 files changed, 3 insertions(+) diff --git a/app/changelogs/v2.10.16/v2.10.16.md b/app/changelogs/v2.10.16/v2.10.16.md index 32a644ac4..0f23d2b53 100644 --- a/app/changelogs/v2.10.16/v2.10.16.md +++ b/app/changelogs/v2.10.16/v2.10.16.md @@ -41,6 +41,7 @@ Below are the detailed changes in this version. ### Document * [Docker compose example](https://github.com/siyuan-note/siyuan/pull/9679) +* [Update data sync notes in the user guide](https://github.com/siyuan-note/siyuan/issues/9699) ### Development diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md index 348c45c47..5907d7953 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md @@ -41,6 +41,7 @@ ### 改進文檔 * [新增 Docker compose 範例](https://github.com/siyuan-note/siyuan/pull/9679) +* [更新使用者指南資料同步章節注意事項](https://github.com/siyuan-note/siyuan/issues/9699) ### 開發者 diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md index 893583042..840ec43dc 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md @@ -41,6 +41,7 @@ ### 改进文档 * [添加 Docker compose 示例](https://github.com/siyuan-note/siyuan/pull/9679) +* [更新用户指南数据同步章节注意事项](https://github.com/siyuan-note/siyuan/issues/9699) ### 开发者 From 2a5c9c3feb29d275fb42e22de59595b537fd9586 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:48:16 +0800 Subject: [PATCH 07/10] :memo: Update changelogs --- app/changelogs/v2.10.16/v2.10.16.md | 4 ++++ app/changelogs/v2.10.16/v2.10.16_zh_CHT.md | 4 ++++ app/changelogs/v2.10.16/v2.10.16_zh_CN.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/app/changelogs/v2.10.16/v2.10.16.md b/app/changelogs/v2.10.16/v2.10.16.md index 0f23d2b53..8ae155283 100644 --- a/app/changelogs/v2.10.16/v2.10.16.md +++ b/app/changelogs/v2.10.16/v2.10.16.md @@ -38,6 +38,10 @@ Below are the detailed changes in this version. * [Support set Chromium command line arguments on the desktop](https://github.com/siyuan-note/siyuan/issues/9696) * [Supports configuring data sync index time-consuming prompts](https://github.com/siyuan-note/siyuan/issues/9698) +## Bugfix + +* [Can't remove query criteria named with space](https://github.com/siyuan-note/siyuan/issues/9700) + ### Document * [Docker compose example](https://github.com/siyuan-note/siyuan/pull/9679) diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md index 5907d7953..1eb27152c 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CHT.md @@ -38,6 +38,10 @@ * [桌面端支援設定 Chromium 命令列參數](https://github.com/siyuan-note/siyuan/issues/9696) * [支援設定資料同步索引耗時提示](https://github.com/siyuan-note/siyuan/issues/9698) +### 修復缺陷 + +* [無法刪除空格命名的查詢條件](https://github.com/siyuan-note/siyuan/issues/9700) + ### 改進文檔 * [新增 Docker compose 範例](https://github.com/siyuan-note/siyuan/pull/9679) diff --git a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md index 840ec43dc..59b5f9a5a 100644 --- a/app/changelogs/v2.10.16/v2.10.16_zh_CN.md +++ b/app/changelogs/v2.10.16/v2.10.16_zh_CN.md @@ -38,6 +38,10 @@ * [桌面端支持设置 Chromium 命令行参数](https://github.com/siyuan-note/siyuan/issues/9696) * [支持配置数据同步索引耗时提示](https://github.com/siyuan-note/siyuan/issues/9698) +### 修复缺陷 + +* [无法删除空格命名的查询条件](https://github.com/siyuan-note/siyuan/issues/9700) + ### 改进文档 * [添加 Docker compose 示例](https://github.com/siyuan-note/siyuan/pull/9679) From 979f832a26965af2ba6e341ea7164660c447db73 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 21:51:33 +0800 Subject: [PATCH 08/10] :speech_balloon: Update text --- app/appearance/langs/en_US.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 8ccd454a8..3ea537dc9 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1254,7 +1254,7 @@ "139": "Data snapshot is being generated, [%s] data files have been processed, [%s] remaining...", "140": "Failed to create data snapshot: %s", "141": "Failed to rollback data snapshot", - "142": "Snapshot memo cannot be empty", + "142": "Input can not be empty", "143": "Creating data snapshot...", "144": "Resetting data repository...", "145": "The data repo has been reset, and the interface will be automatically refreshed later...", From c40605df7232ba31643ac00d1fef0bc81bd397e1 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 22:33:14 +0800 Subject: [PATCH 09/10] :arrow_up: Upgrade kernel deps --- kernel/go.mod | 2 +- kernel/go.sum | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index a0f3c7602..9457ba563 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -50,7 +50,7 @@ require ( github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 github.com/sashabaranov/go-openai v1.17.6 github.com/shirou/gopsutil/v3 v3.23.10 - github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278 + github.com/siyuan-note/dejavu v0.0.0-20231120143143-e407eb1309c0 github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a diff --git a/kernel/go.sum b/kernel/go.sum index fd20e5182..5b8729bbd 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -200,8 +200,6 @@ github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/imroc/req/v3 v3.42.1 h1:g82SouLvX7pqwqJjpQJYrVvuI+LOycWhyuwxtLlyQJk= -github.com/imroc/req/v3 v3.42.1/go.mod h1:W7dOrfQORA9nFoj+CafIZ6P5iyk+rWdbp2sffOAvABU= github.com/imroc/req/v3 v3.42.2 h1:/BwrKXGR7X1/ptccaQAiziDCeZ7T6ye55g3ZhiLy1fc= github.com/imroc/req/v3 v3.42.2/go.mod h1:W7dOrfQORA9nFoj+CafIZ6P5iyk+rWdbp2sffOAvABU= github.com/jaytaylor/html2text v0.0.0-20180606194806-57d518f124b0/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= @@ -358,18 +356,14 @@ github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d h1:lvCTyBbr36+tqMccdGMwuEU+hjux/zL6xSmf5S9ITaA= github.com/shurcooL/gofontwoff v0.0.0-20181114050219-180f79e6909d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= github.com/simplereach/timeutils v1.2.0/go.mod h1:VVbQDfN/FHRZa1LSqcwo4kNZ62OOyqLLGQKYB3pB0Q8= -github.com/siyuan-note/dejavu v0.0.0-20231119064743-97ed128527a4 h1:BqFBEcUGZyMvZjHgftEXaxMkPy0NiDb6F7GKJVPuMrg= -github.com/siyuan-note/dejavu v0.0.0-20231119064743-97ed128527a4/go.mod h1:g8x1cYUKzmvrjuV/EcTeb7EQmgWIYBZlRiDtM1TtNhI= -github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278 h1:TXQ0n4ZGfhJ8pXehMea01AbAvnLCK/M4CuHzS6GPRCA= -github.com/siyuan-note/dejavu v0.0.0-20231120083402-1544c1341278/go.mod h1:kvFQAGwX1o1eKPyn3c+ftsN5yqliSpalA057MIwHnDs= +github.com/siyuan-note/dejavu v0.0.0-20231120143143-e407eb1309c0 h1:MvzFOpZiV94vbqSSdjeE3bK7pfJ4oCPzCQpdH22L42U= +github.com/siyuan-note/dejavu v0.0.0-20231120143143-e407eb1309c0/go.mod h1:qhORyWwn+RS2TMw7aga1Nkti6E0N9CjEVVw3wIgaeLQ= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE= github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw= github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80 h1:XghjHKJd+SiL0DkGYFVC+UGUDFtnR4v9gkAbPeh9Eq8= github.com/siyuan-note/eventbus v0.0.0-20230804030110-cf250f838c80/go.mod h1:Sqo4FYX5lAXu7gWkbEdJF0e6P57tNNVV4WDKYDctokI= github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a h1:fNWhSpB+e0zOc76isiXAhjiQRaHocitRhWthCaCYTJA= github.com/siyuan-note/filelock v0.0.0-20231107122348-6ed75b0b525a/go.mod h1:HjtfP1NLDw53BRSeAPJgZDIGqyxi4bANYn1IhgDCQUY= -github.com/siyuan-note/httpclient v0.0.0-20231114005512-c39c76a8c333 h1:IelcK7j2VVNeiU9ta/B7JsohG+wzGXT2iO25oQVmP7A= -github.com/siyuan-note/httpclient v0.0.0-20231114005512-c39c76a8c333/go.mod h1:yiR/Uml8/YF9a/m7P2Fb7MlYNXSXX9peWTuPggGddB4= github.com/siyuan-note/httpclient v0.0.0-20231120083123-750db4d28b38 h1:deUrbUOwmsNYRT0x12GHaJ8exxmDMwXFL/1J4dVnLMM= github.com/siyuan-note/httpclient v0.0.0-20231120083123-750db4d28b38/go.mod h1:QOTSBBSeKU90Kb4aeDVcQ0G+2zJcNuhkwAlsJ2cnmkQ= github.com/siyuan-note/logging v0.0.0-20231030034701-8265764f00ff h1:5GcxrTOJTsusXOLhg4GuHWbEa4M5gu+CNfL0giwNjDM= From 3294cb9281f2a56780bd84306023ed9ffc40890a Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 20 Nov 2023 22:34:22 +0800 Subject: [PATCH 10/10] :arrow_up: Upgrade kernel deps --- kernel/go.mod | 2 +- kernel/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/go.mod b/kernel/go.mod index 9457ba563..f55de7767 100644 --- a/kernel/go.mod +++ b/kernel/go.mod @@ -48,7 +48,7 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible github.com/radovskyb/watcher v1.0.7 github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 - github.com/sashabaranov/go-openai v1.17.6 + github.com/sashabaranov/go-openai v1.17.8 github.com/shirou/gopsutil/v3 v3.23.10 github.com/siyuan-note/dejavu v0.0.0-20231120143143-e407eb1309c0 github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 diff --git a/kernel/go.sum b/kernel/go.sum index 5b8729bbd..a7ca3c02d 100644 --- a/kernel/go.sum +++ b/kernel/go.sum @@ -341,8 +341,8 @@ github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0 h1:C8DZB5okjhCSd7zvkOM+ github.com/rqlite/sql v0.0.0-20221103124402-8f9ff0ceb8f0/go.mod h1:ib9zVtNgRKiGuoMyUqqL5aNpk+r+++YlyiVIkclVqPg= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= -github.com/sashabaranov/go-openai v1.17.6 h1:hYXRPM1xO6QLOJhWEOMlSg/l3jERiKDKd1qIoK22lvs= -github.com/sashabaranov/go-openai v1.17.6/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= +github.com/sashabaranov/go-openai v1.17.8 h1:snuE7l0XQ1KAmkY/cODAEgxu2fl+g/ybXK6cKQzli/E= +github.com/sashabaranov/go-openai v1.17.8/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE=