mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 16:08:02 +08:00
Default channel_monitor_mode to v1 (opt-in V2) so upgrades keep active probes; existing explicit v2 rows are left alone via ON CONFLICT DO NOTHING plus migration checksum compatibility for already-applied 195. V2 first-enable backfill no longer compresses ticks to 5s or uses 24h chunks. Each tick does recent overlap plus at most one historical chunk with depth-based ceilings (2h/4h/6h), adaptive grow/shrink, and failure backoff. Error request_id dedup is bounded by a 90-minute lookback so ops_error_logs is not scanned for full history. Also align hide_throughput parse default with privacy-preserving public runtime (missing key → true).
6 lines
265 B
SQL
6 lines
265 B
SQL
-- Channel monitor exclusive mode: v1 (active probes) or v2 (passive aggregation).
|
|
-- Default v1 preserves existing active-probe behavior; operators opt in to v2.
|
|
INSERT INTO settings (key, value)
|
|
VALUES ('channel_monitor_mode', 'v1')
|
|
ON CONFLICT (key) DO NOTHING;
|