mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-27 01:19:25 +08:00
fix(panel): harden SQLite ledger concurrency, LRU sizing, and recovery
- Preserve step detail_json and peer-appended rows during cold metadata flushes, slim-step spreads, and mixed-case UUID re-keying without triggering case-insensitive self-deletion - Raise default hot session LRU limit to 64 and prime stepSigs during on-demand hydration to avoid cyclic read thrashing across 30-session quick stats plus active subagents - Quarantine corrupt SQLite images to .corrupt.<ts> with automatic .json.bak recovery and defer latching loadedOnce until initial hydration succeeds - Flush pending throttled endpoint caches on worker/standalone stop, isolate unscoped node --test runs from live user data, and transitively retain nested subagents and side questions on cache rebuilds
This commit is contained in:
@@ -476,13 +476,28 @@ export function getRemoteWindowRpcInvoker() {
|
||||
return registeredWindowRpcInvoker;
|
||||
}
|
||||
|
||||
if (typeof process !== 'undefined' && typeof process?.once === 'function') {
|
||||
process.once('exit', () => {
|
||||
for (const ep of remoteEndpointRegistry.values()) {
|
||||
export function flushAllEndpointCachesNow() {
|
||||
try {
|
||||
if (hasPendingTrajectoryCacheSave()) {
|
||||
flushTrajectoryCacheNow();
|
||||
}
|
||||
} catch {
|
||||
// 忽略关闭阶段本机刷盘异常
|
||||
}
|
||||
for (const ep of remoteEndpointRegistry.values()) {
|
||||
try {
|
||||
if (ep.store.hasPendingTrajectoryCacheSave()) {
|
||||
ep.store.flushTrajectoryCacheNow();
|
||||
}
|
||||
ep.store.cancelFlushTimer();
|
||||
} catch {
|
||||
// 忽略关闭阶段远端端点刷盘异常
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof process !== 'undefined' && typeof process?.once === 'function') {
|
||||
process.once('exit', () => {
|
||||
flushAllEndpointCachesNow();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user