Skip to content

[#1135] Head the last near-limit column of backendstat show-index-status 80%, the threshold it counts from - #1138

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:issue-1135-backendstat-near-limit-heading
Oct 1, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:issue-1135-backendstat-near-limit-heading

Conversation

@vharseko

Copy link
Copy Markdown
Member

Fixes #1135

Problem

The last column of backendstat show-index-status was headed 85%, but it counted the keys holding from 80% up to 90% of the index entry limit: nearLimit let a key in from entryLimit * 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:

The sample output in the Administration Guide (Indexing) shows the 80% heading.

Tests

BackendStatTest:

  • the two existing cases now go through 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 BackendStat are 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.adoc exists only in #1132, and names the column 85% there (while already describing the 80–90% range). Whichever of the two PRs is merged second updates that partial to 80%.

@vharseko vharseko added bug docs index Attribute/VLV index subsystem: build, trust, rebuild, confidentiality java Changes to Java sources labels Sep 30, 2026

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The heading and the bucket now come from one list, and the new arithmetic changes nothing it shouldn't.

  • NEAR_LIMIT_PERCENTS feeds both the headings (BackendStat.java:1035-1038) and nearLimitColumn, so the #1135 mismatch can no longer come from two separate literals.
  • nearLimitColumn's size * 100 >= entryLimit * percent classifies exactly like the old entryLimit * 0.95 / 0.9 / 0.8 doubles: 0 differences over 376,500,012 boundary sizes (every limit 1..5,000,000 plus 20M random limits up to Integer.MAX_VALUE).
  • testEachColumnCountsTheKeysFromItsHeadingUpToThePreviousOne walks 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
vharseko force-pushed the issue-1135-backendstat-near-limit-heading branch from 502179f to 18f0e28 Compare October 1, 2026 11:19
@vharseko
vharseko merged commit 8c75bb5 into OpenIdentityPlatform:master Oct 1, 2026
15 checks passed
@vharseko
vharseko deleted the issue-1135-backendstat-near-limit-heading branch October 1, 2026 11:31
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug docs index Attribute/VLV index subsystem: build, trust, rebuild, confidentiality java Changes to Java sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backendstat show-index-status: the column headed 85% counts keys from 80% of the index entry limit

2 participants