An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 同步创建数据快照失败 Fix https://github.com/siyuan-note/siyuan/issues/6106
Liang Dingf3413cb583fc
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex cbf9af50c9..87f93bca90 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -809,7 +809,7 @@"20": "Cannot be converted to heading when including sub-documents","21": "Please enter the captcha","22": "The captcha is incorrect",- "23": "The data repo is corrupted due to external changes (such as using a third-party real-time synchronization disk), please reset the data repo",+ "23": "The data repo is corrupted, please reset the data repo","24": "Network timed out, please try again later","25": "The attribute name only supports English letters and digits","26": "Please initialize the data repo key first in [Settings - About - Data repo key]",@@ -891,7 +891,7 @@"102": "Processing completed","103": "The update installation package has been automatically downloaded in the background. When exiting, you will be asked whether to install the new version","104": "The update installation package failed to download, please check the network connection",- "105": "TODO",+ "105": "Corrupted data repo have been automatically reset","106": "TODO","107": "Moving document [%s]","108": "Cleaning obsolete indexes...",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex c53f024339..e29ab4e119 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -809,7 +809,7 @@"20": "No se puede convertir en título al incluir subdocumentos","21": "Por favor ingrese el captcha","22": "El captcha es incorrecto",- "23": "El repositorio de datos está dañado debido a cambios externos (como el uso de un disco de sincronización en tiempo real de terceros), restablezca el repositorio de datos",+ "23": "El repositorio de datos está dañado, reinicie el repositorio de datos","24": "Se agotó el tiempo de espera de la red. Vuelva a intentarlo más tarde.","25": "El nombre del atributo sólo admite letras y dígitos en inglés","26": "Por favor, inicialice primero la clave de repositorio de datos en [Configuración - Acerca de - Clave de repositorio de datos]",@@ -891,7 +891,7 @@"102": "Procesamiento completado","103": "El paquete de instalación de la actualización se ha descargado automáticamente en segundo plano. Al salir, se le preguntará si desea instalar la nueva versión","104": "El paquete de instalación de la actualización no se pudo descargar, verifique la conexión de red",- "105": "TODO",+ "105": "El repositorio de datos corruptos se ha restablecido automáticamente","106": "TODO","107": "Moviendo documento [%s]","108": "Limpiando índices obsoletos...",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 840a97f6e4..43931263ac 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -809,7 +809,7 @@"20": "Ne peut pas être converti en titre lorsque des sous-documents sont inclus.","21": "Veuillez entrer le captcha","22": "Le captcha est incorrect",- "23": "Le référentiel de données est endommagé en raison de modifications externes (comme l'utilisation d'un disque de synchronisation en temps réel tiers), veuillez réinitialiser le référentiel de données",+ "23": "Le référentiel de données est corrompu, veuillez réinitialiser le référentiel de données","24": "Le réseau a expiré, veuillez réessayer plus tard","25": "Le nom de l'attribut ne supporte que les lettres et les chiffres anglais.","26": "Veuillez d'abord initialiser la clé du référentiel de données dans [Paramètres - À propos - Clé du référentiel de données]",@@ -891,7 +891,7 @@"102": "Traitement terminé","103": "Le package d'installation de la mise à jour a été automatiquement téléchargé en arrière-plan. En quittant, il vous sera demandé si vous souhaitez installer la nouvelle version","104": "Le package d'installation de la mise à jour n'a pas pu être téléchargé, veuillez vérifier la connexion réseau",- "105": "TODO",+ "105": "Le référentiel de données corrompu a été automatiquement réinitialisé","106": "TODO","107": "Déplacement du document [%s]","108": "Nettoyage des index obsolètes...",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 7e3ee7455c..75470499c2 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -809,7 +809,7 @@"20": "包含子文檔時無法轉換為標題","21": "請輸入驗證碼","22": "驗證碼不正確",- "23": "數據倉庫因為外部變更損壞(比如使用第三方實時同步盤),請重置數據倉庫",+ "23": "數據倉庫已被損壞,請重置數據倉庫","24": "網絡超時,請稍後再試","25": "屬性名僅支援英文字母和阿拉伯數字","26": "請先在 [設置 - 關於 - 數據倉庫密鑰] 中初始化數據倉庫密鑰",@@ -891,7 +891,7 @@"102": "處理完畢","103": "已經在後台開始自動下載更新安裝包,退出時將詢問是否安裝新版本","104": "更新安裝包下載失敗,請檢查網絡連接",- "105": "TODO",+ "105": "已經自動重置損壞的數據倉庫","106": "TODO","107": "正在移動文檔 [%s]","108": "正在清理已過時的索引...",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 8d6e3254fe..ad57fc55fc 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -809,7 +809,7 @@"20": "包含子文档时无法转换为标题","21": "请输入验证码","22": "验证码不正确",- "23": "数据仓库因为外部变更损坏(比如使用第三方实时同步盘),请重置数据仓库",+ "23": "数据仓库已被损坏,请重置数据仓库","24": "网络超时,请稍后再试","25": "属性名仅支持英文字母和阿拉伯数字","26": "请先在 [设置 - 关于 - 数据仓库密钥] 中初始化数据仓库密钥",@@ -862,7 +862,7 @@"73": "正在导入,请稍等...","74": "内核尚未完全启动 [%d%%],请稍后再试","75": "尝试访问文件失败",- "76": "数据文件已被其他程序锁定。(如果使用了第三方同步盘,请检查同步状态)",+ "76": "数据文件已被其他程序锁定。","77": "不可用的目录路径 [%s]","78": "新老路径重复","79": "仅支持导入 Markdown 文档",@@ -891,7 +891,7 @@"102": "处理完毕","103": "已经在后台开始自动下载更新安装包,退出时将询问是否安装新版本","104": "更新安装包下载失败,请检查网络连接",- "105": "TODO",+ "105": "已经自动重置损坏的数据仓库","106": "TODO","107": "正在移动文档 [%s]","108": "正在清理已过时的索引...",diff --git a/kernel/go.mod b/kernel/go.modindex 8d5fa90bf8..95a4f846f3 100644--- a/kernel/go.mod+++ b/kernel/go.mod@@ -37,7 +37,7 @@ require (github.com/patrickmn/go-cache v2.1.0+incompatiblegithub.com/qiniu/go-sdk/v7 v7.13.0github.com/radovskyb/watcher v1.0.7- github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821a+ github.com/siyuan-note/dejavu v0.0.0-20221009014342-57351eb27c75github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75github.com/siyuan-note/eventbus v0.0.0-20220916025349-3ac6e75522dagithub.com/siyuan-note/filelock v0.0.0-20221007163134-7e64809023efdiff --git a/kernel/go.sum b/kernel/go.sumindex aabe7729e3..cffdb98d81 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -345,10 +345,8 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lgithub.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=-github.com/siyuan-note/dejavu v0.0.0-20220930021019-e62491947339 h1:jePYjiGBPa5Qs8bCdlPDrRzfNxr0FJ+rQYv/d6H5p8A=-github.com/siyuan-note/dejavu v0.0.0-20220930021019-e62491947339/go.mod h1:Y+bg0j0Z7C66oJWPPYMs+wZuFeiTRWhh2aLkqctJFKk=-github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821a h1:5zn/SFVvih7nwr8bRB9qeZ9NHfjSUA9dneEMqNzsPps=-github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821a/go.mod h1:Y+bg0j0Z7C66oJWPPYMs+wZuFeiTRWhh2aLkqctJFKk=+github.com/siyuan-note/dejavu v0.0.0-20221009014342-57351eb27c75 h1:4aExF0IlFsBj+54knKzWfr+9FVui4lzua/fwXqjKmjQ=+github.com/siyuan-note/dejavu v0.0.0-20221009014342-57351eb27c75/go.mod h1:Y+bg0j0Z7C66oJWPPYMs+wZuFeiTRWhh2aLkqctJFKk=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-20220916025349-3ac6e75522da h1:/jNhl7LC+9BhkWvNxuJDdsNfA/2wvfuj9mqWx4CbV90=diff --git a/kernel/model/repository.go b/kernel/model/repository.goindex 244fe74f02..fa4c8c7655 100644--- a/kernel/model/repository.go+++ b/kernel/model/repository.go@@ -682,15 +682,21 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (err error) {eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBar,})if errors.Is(err, dejavu.ErrNotFoundObject) {+ logging.LogWarnf("data repo is corrupted, try to reset it")resetErr := os.RemoveAll(filepath.Join(repo.Path))if nil != resetErr {- logging.LogErrorf("reset data repo failed: %s", resetErr)+ logging.LogErrorf("remove data repo failed: %s", resetErr)return}- logging.LogWarnf("data repo has been reset caused by not found object")index, err = repo.Index("[Sync] Cloud sync", map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBar,})+ logging.LogWarnf("data repo has been reset")++ go func() {+ time.Sleep(5 * time.Second)+ util.PushMsg(Conf.Language(105), 5000)+ }()}if nil != err {