Skip to content

fix(build): reclaim expired prometheus shared dict entries for release/1.23 - #171

Merged
wklken merged 1 commit into
TencentBlueKing:release/1.23from
wklken:fix/prometheus-expired-shared-dict_for_1.23
Jul 24, 2026
Merged

fix(build): reclaim expired prometheus shared dict entries for release/1.23#171
wklken merged 1 commit into
TencentBlueKing:release/1.23from
wklken:fix/prometheus-expired-shared-dict_for_1.23

Conversation

@wklken

@wklken wklken commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Backport #170 to release/1.23 (APISIX 3.16.0).

The build patch physically reclaims expired Prometheus metric values and key-index slots from prometheus-metrics after the existing expiry scan, preventing shared-dict slab usage from growing indefinitely under label churn.

Source PR: #170
Upstream fix: api7/nginx-lua-prometheus#18
Related issue: apache/apisix#13658

Cherry-picked commits

  • 7b4d193208bc4efa802584eddafacc5a11fef270 fix(build): reclaim expired prometheus shared dict entries

Verification

  • Patch dry-run with --fuzz=0 against apache/apisix:3.16.0-redhat
  • Built bk-apigateway-apisix:prometheus-flush-release-1.23-codex from this branch
  • Verified image label is APISIX 3.16.0
  • Verified the built image contains exactly one self.dict:flush_expired() call in prometheus_keys.lua
  • LuaJIT bytecode compilation of the patched file succeeded
  • RUN_WITH_IT= make lint: 0 warnings / 0 errors
  • RUN_WITH_IT= make test: Busted 752 successes; test-nginx 681 tests, all successful

Checklist

  • 填写 PR 描述及相关 issue (write PR description and related issue)
  • 代码风格检查通过 (code style check passed)
  • PR 中包含单元测试 (include unit test) — dependency patch; upstream PR contains regression tests
  • 单元测试通过 (unit test passed)
  • 本地开发联调环境验证通过 (local development environment verification passed)

@wklken
wklken merged commit fc48f56 into TencentBlueKing:release/1.23 Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant