fix: use accountinfo for bucket statistics#158
Merged
Conversation
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.
Pull Request
Description
Windows trace evidence showed the bucket list receiving complete
accountinfostatistics whiledatausageinfowas still partial. The Console displayed the partial values because both bucket-list implementations sourced object count and size exclusively fromdatausageinfo.This change makes
accountinfo.bucketsauthoritative for bucket object count and size in both the browser root and shared bucket-list component. It reuses the account information already loaded by the permissions context, refreshes that snapshot when the user presses Refresh, preserves valid empty-bucket zero values, and shows unavailable values instead of fabricating zero for missing or malformed statistics.datausageinforemains available for deployment-wide usage and scanner-oriented views.Type of Change
Testing
npx -y node@22 --test tests/lib/*.test.js npx -y node@22 /usr/bin/corepack pnpm type-check npx -y node@22 /usr/bin/corepack pnpm lint npx -y node@22 /usr/bin/corepack pnpm format:check npx -y node@22 /usr/bin/corepack pnpm buildChecklist
Related Issues
Fixes #159.
Related to rustfs/rustfs#3775.
Screenshots (if applicable)
The visual symptom and request-level evidence are documented in rustfs/rustfs#3775 and #159.
Additional Notes
The Windows trace captured complete
accountinfovalues (1600objects /209715200bytes) and partialdatausageinfovalues (1502objects /196870144bytes) during the same cold load; the Console displayed the latter exactly. A subsequent datausage refresh converged, which explains why the existing Refresh action appeared to repair the page.RustFS PR rustfs/rustfs#4698 separately prevents incomplete distributed listings from being accepted by backend usage refreshes. This PR fixes the Console contract independently by using the per-account bucket statistics returned for that purpose instead of selecting a scanner-derived deployment usage snapshot for bucket rows.