-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic purge for local data repo #13091
Comments
云端的不考虑改变策略了,本地的后续考虑看看。 |
考虑了下,清理策略如下:
执行时机: 启动后第一次同步、索引订正结束以后执行,后续每 24 小时执行一次。 |
配置界面长啥样? |
这个配置能留空吗? |
用户更新之后自动清理掉大量快照的话感觉不是很妙,因为用户可能希望保留这些快照 |
还有就是这个配置应该在重启思源之后生效。不然手残输入一个很小的数就麻烦了 |
就这样吧,清理掉是这个 issue 的目的。 输入后不会清理的,要等重启后同步或者定时任务才执行清理。 |
这个随机有点怪,为什么不平均分布呢? |
按时间平均不一定是最优
…---Original---
From: "Jeffrey ***@***.***>
Date: Sun, Nov 17, 2024 01:56 AM
To: ***@***.***>;
Cc: ***@***.***>;"State ***@***.***>;
Subject: Re: [siyuan-note/siyuan] Automatic purge for local data repo (Issue#13091)
每天最多保留 x 个快照,默认 2 个(保留每天最后一个,其他随机保留)
这个随机有点怪,为什么不平均分布呢?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
但是完全随机不是更差吗 |
随机更好,因为快照本身就无法判断重要性,所以随机反而更平均。 |
目前看来这个功能必须有个开关。 |
有个开关的话也需要默认开启,否则用户不会主动开启。 但新增的开关不能默认开启,所以还是不加开关更好。 |
但是,在用户设置前,就已经自动执行了 |
这导致默认的180天以前的快照会完全丢失 |
而且,默认设置的频率也不一定是用户需要的。 |
正在紧急修复,争取等会发版 #13203 |
新版本已经发布。 |
在一定的时间间隔内保存指定数量的未标记的快照,如:
按快照具体时间与当前具体时间的差计算,而不是按日期。
分开配置:
关联需求:
#10787 siyuan-note/dejavu#8
The text was updated successfully, but these errors were encountered: