[#1135] Head the last near-limit column of backendstat show-index-status 80%, the threshold it counts from - #1138
Merged
vharseko merged 1 commit intoOct 1, 2026
Conversation
maximthomas
approved these changes
Oct 1, 2026
maximthomas
left a comment
Contributor
There was a problem hiding this comment.
praise: The heading and the bucket now come from one list, and the new arithmetic changes nothing it shouldn't.
NEAR_LIMIT_PERCENTSfeeds both the headings (BackendStat.java:1035-1038) andnearLimitColumn, so the #1135 mismatch can no longer come from two separate literals.nearLimitColumn'ssize * 100 >= entryLimit * percentclassifies exactly like the oldentryLimit * 0.95 / 0.9 / 0.8doubles: 0 differences over 376,500,012 boundary sizes (every limit 1..5,000,000 plus 20M random limits up toInteger.MAX_VALUE).testEachColumnCountsTheKeysFromItsHeadingUpToThePreviousOnewalks every size up to limits 1, 7, 100, 4000 and 4001.
…dstat show-index-status 80%, the threshold it counts from The column headed 85% counted the keys holding from 80% up to 90% of the index entry limit. The headings and the thresholds of the 95%, 90% and 80% columns now come from one list, so they cannot disagree again.
vharseko
force-pushed
the
issue-1135-backendstat-near-limit-heading
branch
from
October 1, 2026 11:19
502179f to
18f0e28
Compare
vharseko
added a commit
to vharseko/OpenDJ
that referenced
this pull request
Oct 1, 2026
…nfidentiality encrypts, keep the size limits apart, and check the upgrade and backendstat supplements - show-index-status: the near-limit term follows the 80% heading of OpenIdentityPlatform#1138, and the Confidential term says that the lists of entry IDs are encrypted while an equality index hashes its keys and the other index types store them as they are. - dsconfig reference: visitSize separates "Lower value is …", "Upper value is …" and the unlimited sentence, as visitDuration already does. - testGenerateDocHasNoDocBookLeftovers checks that no size sentence is glued to the previous one; BackendStatTest and UpgradeTestCase read the gendoc output of their tool and check its include:: supplement.
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.
Fixes #1135
Problem
The last column of
backendstat show-index-statuswas headed 85%, but it counted the keys holding from 80% up to 90% of the index entry limit:nearLimitlet a key in fromentryLimit * 0.8, and every near key below 0.9 fell into that column.Fix
The heading now reads 80%, the threshold the column actually counts from. The threshold is kept: the counter was named
eighty, the existing test pins "from 80% on", and moving the bucket to 0.85 would silently drop the keys between 80% and 85% of the limit from the report.So that the heading and the threshold cannot disagree again, both come from one list:
NEAR_LIMIT_PERCENTS = { 95, 90, 80 }gives the headings and the thresholds;nearLimit()becomesnearLimitColumn(), which returns the column counting a key, or -1 when the key is not near its limit (anindex-entry-limitof 0 still means no key is near it, An index-entry-limit of 0 is treated as the smallest limit when a change of the limit decides whether the index must be rebuilt #1059). The comparison is exact integer arithmetic (size * 100 >= entryLimit * percent) instead ofentryLimit * 0.95indouble;The sample output in the Administration Guide (Indexing) shows the
80%heading.Tests
BackendStatTest:nearLimitColumn();testTheColumnsAreHeadedByTheirThresholds: the columns are 95/90/80, and sizes 80, 89, 90, 94, 95, 100 of a limit of 100 land in the column their percentage heads;testEachColumnCountsTheKeysFromItsHeadingUpToThePreviousOne: for limits 1, 7, 100, 4000 and 4001 and every size up to the limit, a key is counted exactly when it holds at least 80%, and the column counting it is headed by a percentage the key reaches while the key stays below the percentage heading the column before it.4/4 green. Five mutants of
BackendStatare each caught: the bucket moved to 85% (the other way out the issue offers),>instead of>=, the columns in ascending order, a limit of 0 treated as a limit, and every near key reported in the last column.The loop printing the headings is not covered by a unit test (it needs a backend); it reads the same list the thresholds do.
Note for #1132
The reference partial
_variablelist-backendstat-index-status.adocexists only in #1132, and names the column85%there (while already describing the 80–90% range). Whichever of the two PRs is merged second updates that partial to80%.