fix(prometheus): bump nginx-lua-prometheus-api7 to 0.20260623 to drop duplicate metrics#13602
Merged
AlinsRan merged 1 commit intoJun 24, 2026
Conversation
b942dba to
12c155b
Compare
12c155b to
d8dc08a
Compare
… duplicate metrics nginx-lua-prometheus-api7 0.20260623 fixes duplicate metric emission caused by a KeyIndex desync (api7/nginx-lua-prometheus#14): when a TTL'd metric expires in the shared dict and is re-added at a new slot while a stale slot lingers before another worker's incremental-sync cursor, that worker lists the same series twice -- the repeated apisix_http_status{...} lines reported in apache#11934. The fix is verified by the library's own unit tests (testListDeduplicatesStaleSlot and testExpiredReAddNoDuplicate in prometheus_test.lua). The duplicate is a cross-worker race that only arises from a specific shared-dict sync interleaving and is not reproducible by a single-worker (or even a naive multi-worker) APISIX integration test -- the shared-dict sync reconciles the stale slot away in any straightforward sequence -- so no t/ case is added here. Fixes apache#11934
d8dc08a to
7c567c4
Compare
nic-6443
approved these changes
Jun 24, 2026
shreemaan-abhishek
approved these changes
Jun 24, 2026
membphis
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
fixes: #11934
Bump
nginx-lua-prometheus-api7from0.20250302-1to0.20260623-1.0.20260623fixes duplicate metric emission caused by aKeyIndexdesync (api7/nginx-lua-prometheus#14): when a TTL'd metric expires in the shared dict and is re-added at a new slot while a stale slot lingers in another worker's key index, that worker lists the same series twice — the repeatedapisix_http_status{...}lines reported in #11934.rockspec: https://luarocks.org/nginx-lua-prometheus-api7-0.20260623-1.rockspec
Tests
The fix targets a cross-worker race in
prometheus_keysand is verified by the library's own unit tests shipped with this release (testListDeduplicatesStaleSlot,testExpiredReAddNoDuplicate). It is not reproducible through an APISIX integration test, so none is added here.Checklist