fix: correct native histogram bucket merge on scale-down#2273
Closed
arnabnandy7 wants to merge 2 commits into
Closed
fix: correct native histogram bucket merge on scale-down#2273arnabnandy7 wants to merge 2 commits into
arnabnandy7 wants to merge 2 commits into
Conversation
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [mise](https://redirect.github.com/jdx/mise) | minor | `v2026.6.14` → `v2026.7.0` | --- ### Release Notes <details> <summary>jdx/mise (mise)</summary> ### [`v2026.7.0`](https://redirect.github.com/jdx/mise/releases/tag/v2026.7.0): : Shell expansion by default, monorepo lockfiles, and task usage mounts [Compare Source](https://redirect.github.com/jdx/mise/compare/vfox-v2026.6.14...vfox-v2026.7.0) ##### Added - **env:** enable shell expansion by default; opt out with `env_shell_expand = false` ([#​10702](https://redirect.github.com/jdx/mise/pull/10702) by [@​jdx](https://redirect.github.com/jdx)). - **monorepo:** `mise install --monorepo` and `mise ls --monorepo` install/list the union of tools across `[monorepo].config_roots`; new tri-state `[monorepo].lockfile` for unified root lockfiles ([#​10707](https://redirect.github.com/jdx/mise/pull/10707) by [@​jdx](https://redirect.github.com/jdx)). - **task:** root-level `#USAGE mount ...` in file tasks (including shorthand `mount "cmd"`) hoists mounted usage specs onto the generated task command ([#​10704](https://redirect.github.com/jdx/mise/pull/10704) by [@​jdx](https://redirect.github.com/jdx)). - **github:** per-tool `github_attestations` option to disable GitHub Artifact Attestation verification for a single tool ([#​10694](https://redirect.github.com/jdx/mise/pull/10694) by [@​jdx](https://redirect.github.com/jdx)). - **upgrade:** `minimum_release_age` warnings now include the release date, when the version becomes eligible, and the effective cutoff value ([#​10705](https://redirect.github.com/jdx/mise/pull/10705) by [@​jdx](https://redirect.github.com/jdx)). - **bootstrap:** brew formulae prune is now prefix-inventory based and can remove any linked formula outside the resolved `[bootstrap.packages]` closure ([#​10618](https://redirect.github.com/jdx/mise/pull/10618) by [@​jdx](https://redirect.github.com/jdx)). - **brew:** support cask `font` artifacts and additional non-install artifact types (completions/manpages) ([#​10671](https://redirect.github.com/jdx/mise/pull/10671) by [@​roele](https://redirect.github.com/roele)). - **platform:** Android asset detection for tools like Termux packages ([#​10653](https://redirect.github.com/jdx/mise/pull/10653) by [@​bltavares](https://redirect.github.com/bltavares)). ##### Fixed - **install:** respect the lockfile-recorded backend during `--locked` installs ([#​10599](https://redirect.github.com/jdx/mise/pull/10599) by [@​risu729](https://redirect.github.com/risu729)). - **install:** installer prints a clearer message and suggests `cargo install --locked mise` on unsupported architectures ([#​10627](https://redirect.github.com/jdx/mise/pull/10627) by [@​risu729](https://redirect.github.com/risu729)). - **install-into:** refuse to overwrite a non-empty target directory without `--yes` ([#​10630](https://redirect.github.com/jdx/mise/pull/10630) by [@​JamBalaya56562](https://redirect.github.com/JamBalaya56562)). - **aqua:** resolve bin paths with `v`-prefixed version overrides (e.g. `sharkdp/fd@10.3.0`) ([#​10696](https://redirect.github.com/jdx/mise/pull/10696) by [@​jdx](https://redirect.github.com/jdx)). - **aqua:** download private GitHub release assets via the API asset endpoint when the browser URL 404s ([#​10622](https://redirect.github.com/jdx/mise/pull/10622) by [@​yacchi](https://redirect.github.com/yacchi)). - **brew-cask:** handle raw executable binaries, resolve `$APPDIR` paths, and use `ditto` for app bundle copying to avoid macOS "damaged app" errors ([#​10626](https://redirect.github.com/jdx/mise/pull/10626) by [@​arthurh4](https://redirect.github.com/arthurh4)). - **config:** preserve set values in `mise config set` for comma-separated set-typed settings ([#​10647](https://redirect.github.com/jdx/mise/pull/10647) by [@​KrishRVH](https://redirect.github.com/KrishRVH)). - **config:** render `task_config.includes` templates with resolved `vars` ([#​10700](https://redirect.github.com/jdx/mise/pull/10700) by [@​jdx](https://redirect.github.com/jdx)). - **config:** support `required` validation and `redact = true` on `[vars]`; render tool option templates recursively ([#​10697](https://redirect.github.com/jdx/mise/pull/10697) by [@​jdx](https://redirect.github.com/jdx)). - **dotnet:** validate SDK installs with `dotnet --list-sdks` so `global.json` roll-forward no longer causes false failures ([#​10691](https://redirect.github.com/jdx/mise/pull/10691) by [@​jdx](https://redirect.github.com/jdx)). - **generate:** `mise generate tool-stub --lock` respects configured `lockfile_platforms` ([#​10709](https://redirect.github.com/jdx/mise/pull/10709) by [@​JamBalaya56562](https://redirect.github.com/JamBalaya56562)). - **github:** handle missing/empty `url_api` in older lockfile entries, falling back to the cached browser URL ([#​10703](https://redirect.github.com/jdx/mise/pull/10703) by [@​jdx](https://redirect.github.com/jdx)). - **hooks:** set `MISE_INSTALLED_TOOLS=[]` on no-op installs so `postinstall` always receives a valid JSON array ([#​10615](https://redirect.github.com/jdx/mise/pull/10615) by [@​JamBalaya56562](https://redirect.github.com/JamBalaya56562)). - **http:** don't let netrc credentials clobber explicit forge tokens on un-redirected URLs, fixing private GitHub release asset downloads ([#​10713](https://redirect.github.com/jdx/mise/pull/10713) by [@​yacchi](https://redirect.github.com/yacchi)). - **lockfile:** merge platform data when a tool's options newly diverge from an empty on-disk entry (e.g. java `shorthand_vendor`), preventing checksum/URL loss ([#​10710](https://redirect.github.com/jdx/mise/pull/10710) by [@​JamBalaya56562](https://redirect.github.com/JamBalaya56562)). - **npm:** map `allow_builds` to npm 11.16+ `--allow-scripts` / `--dangerously-allow-all-scripts` instead of forcing `--ignore-scripts` ([#​10690](https://redirect.github.com/jdx/mise/pull/10690) by [@​jdx](https://redirect.github.com/jdx)). - **oci:** canonicalize install paths when rebasing `PATH`, fixing `mise oci` on systems with symlinked `/home` (Bluefin/Silverblue) ([#​10624](https://redirect.github.com/jdx/mise/pull/10624) by [@​salim-b](https://redirect.github.com/salim-b)). - **oci:** account for darwin mode stripping in layer test expectations ([#​10681](https://redirect.github.com/jdx/mise/pull/10681) by [@​laozc](https://redirect.github.com/laozc)). - **ruby:** stop forcing `no-yjit` Ruby builds on older glibc ([#​10620](https://redirect.github.com/jdx/mise/pull/10620) by [@​jdx](https://redirect.github.com/jdx)). - **sigstore:** retry GitHub attestation verification with the TUF trust root after embedded-root failures; workflow mismatches remain non-retryable ([#​10695](https://redirect.github.com/jdx/mise/pull/10695) by [@​jdx](https://redirect.github.com/jdx)). - **task:** render monorepo subproject task templates with the subproject's own `[env]`; broken subprojects no longer fail discovery repo-wide ([#​10706](https://redirect.github.com/jdx/mise/pull/10706) by [@​jdx](https://redirect.github.com/jdx)). - **task:** correct env used for the `task.show_full_cmd` setting ([#​10714](https://redirect.github.com/jdx/mise/pull/10714) by [@​muzimuzhi](https://redirect.github.com/muzimuzhi)). - **vfox:** Lua `os.getenv` now reads from mise's env table like `cmd.exec`/`os.execute` ([#​10719](https://redirect.github.com/jdx/mise/pull/10719) by [@​jdx](https://redirect.github.com/jdx)). - **watch:** forward `--ignore`, `--ignore-file`, and `--print-events` to watchexec ([#​10629](https://redirect.github.com/jdx/mise/pull/10629) by [@​JamBalaya56562](https://redirect.github.com/JamBalaya56562)). - **windows:** allow GHCUp to be installed on Windows via aqua ([#​10670](https://redirect.github.com/jdx/mise/pull/10670) by [@​cprecioso](https://redirect.github.com/cprecioso)). - **copr:** drop retired Fedora 42 chroots from the default build list ([#​10698](https://redirect.github.com/jdx/mise/pull/10698) by [@​jdx](https://redirect.github.com/jdx)). ##### Security - Ignore transitive `quick-xml` advisories RUSTSEC-2026-0194/-0195 pending upstream fixes ([#​10717](https://redirect.github.com/jdx/mise/pull/10717) by [@​jdx](https://redirect.github.com/jdx)). ##### 💚 Sponsor mise mise is built by [@​jdx](https://redirect.github.com/jdx) under [**en.dev**](https://en.dev) — an independent studio making developer tooling (mise, [aube](https://aube.en.dev/), and more). Development is funded by sponsors. If mise saves you or your team time, please consider sponsoring at [en.dev](https://en.dev). Individual and company sponsorships keep mise fast, free, and independent. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 4am on Monday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/prometheus/client_java). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI0Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
5ec3d02 to
6e89c79
Compare
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.
Summary
Fix native histogram bucket remapping when the bucket width is doubled during schema scale-down.
The previous merge formula used:
That works for positive bucket indexes, but not for negative even indexes. Java integer division truncates toward zero, so negative even buckets were merged into the bucket immediately to the right of the correct target.
This matches the behaviour described and aligns the merge formula with client_golang:
Why
When
doubleBucketWidth()runs, counts from some negative native histogram buckets could be shifted into neighbouring buckets. That can make Prometheus interpret the reshuffled bucket counters as resets, causing spikes in queries such as:Tests
Added a focused regression test for negative, zero, and positive bucket index remapping during
doubleBucketWidth(Map).Verified locally:
Also verified: