diff --git a/backend/internal/handler/admin/account_handler.go b/backend/internal/handler/admin/account_handler.go index a735d5c0..f6082e09 100644 --- a/backend/internal/handler/admin/account_handler.go +++ b/backend/internal/handler/admin/account_handler.go @@ -1764,4 +1764,3 @@ func sanitizeExtraBaseRPM(extra map[string]any) { } extra["base_rpm"] = v } - diff --git a/backend/internal/repository/rpm_cache.go b/backend/internal/repository/rpm_cache.go index 80954f52..4d73ec4b 100644 --- a/backend/internal/repository/rpm_cache.go +++ b/backend/internal/repository/rpm_cache.go @@ -23,9 +23,9 @@ import ( // 通过 rdb.Time() 获取服务端时间,避免多实例时钟不同步。 // // 设计决策: -// - TxPipeline vs Pipeline:Pipeline 仅合并发送但不保证原子,TxPipeline 使用 MULTI/EXEC 事务保证原子执行。 -// - rdb.Time() 单独调用:Pipeline/TxPipeline 中无法引用前一命令的结果,因此 TIME 必须单独调用(2 RTT)。 -// Lua 脚本可以做到 1 RTT,但在 Redis Cluster 中动态拼接 key 存在 CROSSSLOT 风险,选择安全性优先。 +// - TxPipeline vs Pipeline:Pipeline 仅合并发送但不保证原子,TxPipeline 使用 MULTI/EXEC 事务保证原子执行。 +// - rdb.Time() 单独调用:Pipeline/TxPipeline 中无法引用前一命令的结果,因此 TIME 必须单独调用(2 RTT)。 +// Lua 脚本可以做到 1 RTT,但在 Redis Cluster 中动态拼接 key 存在 CROSSSLOT 风险,选择安全性优先。 const ( // RPM 计数器键前缀 // 格式: rpm:{accountID}:{minuteTimestamp}