fix: 网关限流系统配置 Key 改为三段式,修复注册失败
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m35s

- 受控系统配置要求 Key 至少三段,原两段式 Key(如 polling.rate_limit_mode)注册被拒,后台不可见、限流器只能使用默认值
- Key 改为 polling.gateway.* 与 polling.stop_resume_record.*;新增迁移 000247 将已落库的旧 Key 改名并保留取值
- 后续提案中规划的开关同步改为三段式(polling.scheduler.mode、polling.stop_resume.queue_enabled)
This commit is contained in:
邹进
2026-10-24 16:17:34 +09:00
parent 9b0930db9f
commit 02a842f066
16 changed files with 70 additions and 34 deletions

View File

@@ -129,7 +129,7 @@ const (
RateLimitExemptManualRefresh = "manual_refresh"
)
// 限流模式(polling.rate_limit_mode)。
// 限流模式(polling.gateway.rate_limit_mode)。
const (
// RateLimitModeObserve 只统计不拦截。
RateLimitModeObserve = "observe"
@@ -142,17 +142,17 @@ const (
// SystemConfigModulePolling 是轮询与网关限流配置模块。
SystemConfigModulePolling = "polling"
// SystemConfigPollingRateLimitMode 网关限流模式。
SystemConfigPollingRateLimitMode = "polling.rate_limit_mode"
SystemConfigPollingRateLimitMode = "polling.gateway.rate_limit_mode"
// SystemConfigPollingGatewayDefaultQPS 默认每秒请求上限。
SystemConfigPollingGatewayDefaultQPS = "polling.gateway_default_qps"
SystemConfigPollingGatewayDefaultQPS = "polling.gateway.default_qps"
// SystemConfigPollingRateLimitedRetryDelay Asynq 任务遇限流后的固定重试延迟(秒)。
SystemConfigPollingRateLimitedRetryDelay = "polling.rate_limited_retry_delay_seconds"
SystemConfigPollingRateLimitedRetryDelay = "polling.gateway.rate_limited_retry_delay_seconds"
// SystemConfigPollingRateLimitDeferAlert 限流累计推迟告警阈值(秒)。
SystemConfigPollingRateLimitDeferAlert = "polling.rate_limit_defer_alert_seconds"
SystemConfigPollingRateLimitDeferAlert = "polling.gateway.rate_limit_defer_alert_seconds"
// SystemConfigPollingStopResumeRecordRetention 停复机记录保留月数。
SystemConfigPollingStopResumeRecordRetention = "polling.stop_resume_record_retention_months"
SystemConfigPollingStopResumeRecordRetention = "polling.stop_resume_record.retention_months"
// SystemConfigPollingStopResumeRecordPremake 停复机记录提前建分区月数。
SystemConfigPollingStopResumeRecordPremake = "polling.stop_resume_record_premake_months"
SystemConfigPollingStopResumeRecordPremake = "polling.stop_resume_record.premake_months"
)
// TaskTypeStopResumeRecordPartition 停复机记录分区维护定时任务(每日执行,使用数据清理队列)。