fix(panel): ignore empty .db-wal mtime churn and throttle remote SSH trajectory rescan

This commit is contained in:
ss
2026-11-22 22:24:01 +08:00
parent 0401868be0
commit 615a387de8
4 changed files with 252 additions and 10 deletions
+2 -1
View File
@@ -88,8 +88,9 @@ export function computeSqliteWalSig(dbPath) {
}
const dbMtimeMs = Number(dbStat.mtimeMs || 0);
const dbSize = Number(dbStat.size || 0);
const walMtimeMs = Number(walStat?.mtimeMs || 0);
const walSize = Number(walStat?.size || 0);
// 0 字节的空 .db-wal 不含未 checkpoint 事务帧,忽略其 mtime 避免只读打开或宿主 LRU 驱逐触发死循环重扫
const walMtimeMs = walSize > 0 ? Number(walStat?.mtimeMs || 0) : 0;
return {
exists: true,
mtimeMs: Math.max(dbMtimeMs, walMtimeMs),