3x-ui/internal
Hamed 64a7697f56
perf(traffic): skip unchanged global writes between heartbeats (#6931)
* perf(traffic): skip unchanged global writes between heartbeats

Persist directional usage changes immediately, including lower resets, while
refreshing identical global totals only at an inclusive one-hour heartbeat.
Use the GORM clock consistently for the existing 24-hour freshness window and
preserve local-only snapshots, quota enforcement, and downstream forwarding.

Fixes #6928

* docs(traffic): describe persisted global heartbeat timestamps

Replace the stale every-push model comment with the change-or-hourly-heartbeat
rule. Keep the local-counter separation, delta accounting, MAX fold and reset
semantics explicit without treating UpdatedAt as a last-push timestamp.

Address the nonblocking review feedback on PR #6931 without rewriting
published history.

Refs #6928
2026-10-25 08:44:05 +01:00
..
amneziawg fix(amneziawg): bound S1-S3 by the receive buffer, reject overlapping H (#6642) 2026-09-26 22:02:49 +02:00
amneziawgnet fix(amneziawg): keep the fallback egress port below the panel's reserved ports 2026-10-24 12:23:24 +02:00
config v3.10.2 2026-10-14 17:18:43 +02:00
crypto/nodetoken fix(nodetoken): stop refusing every node-token key file on Windows 2026-09-27 15:55:42 +02:00
database perf(traffic): skip unchanged global writes between heartbeats (#6931) 2026-10-25 08:44:05 +01:00
eventbus chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
logger fix(logger): reuse the open log rotator when InitLogger runs again 2026-09-27 15:32:20 +02:00
mtproto feat(mtproto): expose mtg-multi's per-IP pending-handshake limit 2026-10-14 16:46:20 +02:00
nodee2e perf(traffic): skip unchanged global writes between heartbeats (#6931) 2026-10-25 08:44:05 +01:00
pia chore(build): bump Go toolchain to 1.27.0 2026-08-23 21:57:03 +02:00
sub perf(sub): cache each inbound's settings without clients for subscription bodies (#6758) 2026-10-24 22:45:46 +02:00
testpg test(database): give each package its own schema when tests run on PostgreSQL (#6594) 2026-09-26 21:13:42 +02:00
tuic fix(tuic): preserve client identity for Xray user routing (#6875) 2026-10-24 06:20:39 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util fix(monitoring): read LXC CPU, swap and uptime from the container (#6920) 2026-10-24 20:24:34 +02:00
web perf(traffic): skip unchanged global writes between heartbeats (#6931) 2026-10-25 08:44:05 +01:00
xray fix(tuic): preserve client identity for Xray user routing (#6875) 2026-10-24 06:20:39 +02:00