Title: Failed registration removes exposition names reserved by existing collectors · Issue #2667 · prometheus/client_java · GitHub
Open Graph Title: Failed registration removes exposition names reserved by existing collectors · Issue #2667 · prometheus/client_java
X Title: Failed registration removes exposition names reserved by existing collectors · Issue #2667 · prometheus/client_java
Description: What happened? A failed registration can remove exposition-name reservations belonging to collectors that are still registered. A subsequent registration with a conflicting exposition name is then incorrectly accepted. Reproduced on main...
Open Graph Description: What happened? A failed registration can remove exposition-name reservations belonging to collectors that are still registered. A subsequent registration with a conflicting exposition name is then ...
X Description: What happened? A failed registration can remove exposition-name reservations belonging to collectors that are still registered. A subsequent registration with a conflicting exposition name is then ...
Opengraph URL: https://github.com/prometheus/client_java/issues/2667
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failed registration removes exposition names reserved by existing collectors","articleBody":"### What happened?\n\nA failed registration can remove exposition-name reservations belonging to collectors that are still registered. A subsequent registration with a conflicting exposition name is then incorrectly accepted.\n\nReproduced on main at `85d9fb0dca9f064c746470e91b924d253abf8d30`.\n\n### Reproduction\n\n1. Register a counter named `events`.\n2. Try to register another counter with the same name and label schema; registration correctly throws.\n3. Register a gauge named `events_total`.\n\nExpected: step 3 is rejected because the original counter still owns the `events_total` time series name.\n\nActual: step 3 succeeds. The failed registration released the original counter's `events_total` and `events_created` reservations.\n\nThe same issue occurs after conflicting help metadata, conflicting metric types with overlapping suffixes, partial exposition-name conflicts, and a failing `MultiCollector` registration.\n\n### Cause\n\n`claimExpositionNames()` treats a reservation already held by the same Prometheus name as reusable. Both its conflict rollback and `validateRegistration()`'s failure rollback nevertheless release the whole candidate set, including reservations that predate the failed attempt.\n\nA fix should release only reservations acquired by the current attempt, with claiming and rollback kept inside the existing per-name `registered.compute()` operation so another successful registration of the same name cannot interleave with rollback.\n\nFive regression tests reproduce the loss while the 27 existing registry tests pass. I have a fix prepared.\n\nAI assistance was used for investigation and regression test preparation.","author":{"url":"https://github.com/yangjj-iso","@type":"Person","name":"yangjj-iso"},"datePublished":"2026-11-07T14:42:22Z","url":"https://github.com/prometheus/client_java/issues/2667"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:780d593b-1e7f-76be-dd64-0fd34fab93bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90CE:2BC4C5:3D2AB:54F95:6AFBB348 |
| html-safe-nonce | 0cb5d5f966a3b5774ba3603b364eac088c5366822343f1122a1bef89aad72e9a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MENFOjJCQzRDNTozRDJBQjo1NEY5NTo2QUZCQjM0OCIsInZpc2l0b3JfaWQiOiI0MzcxNDkyNTA4MjI0MTcyODcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ea8f842205f171e84b248ac6c886657f2eca601af4c9e4b9a6853cee4f7db061 |
| hovercard-subject-tag | issue:6260324151 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/prometheus/client_java/2667/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f1b0226155289af991c5f378ee7ba4c3e3930643b4eb1bb81e75855062786ed2/prometheus/client_java/issues/2667 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f1b0226155289af991c5f378ee7ba4c3e3930643b4eb1bb81e75855062786ed2/prometheus/client_java/issues/2667 |
| og:image:alt | What happened? A failed registration can remove exposition-name reservations belonging to collectors that are still registered. A subsequent registration with a conflicting exposition name is then ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yangjj-iso |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/prometheus/client_java git https://github.com/prometheus/client_java.git |
| octolytics-dimension-user_id | 3380462 |
| octolytics-dimension-user_login | prometheus |
| octolytics-dimension-repository_id | 7997879 |
| octolytics-dimension-repository_nwo | prometheus/client_java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7997879 |
| octolytics-dimension-repository_network_root_nwo | prometheus/client_java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width