fix(libsql): omit unknown overview size bytes - #569
Merged
cevheri merged 1 commit intoSep 5, 2026
Conversation
Akimbo92i
marked this pull request as ready for review
September 5, 2026 11:26
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
|
Merged, thank you. Verified locally the way the issue asked: the flipped assertion fails against main's source with "Received: 0" and passes with your change, the libSQL unit and integration suites are green, and typecheck, format and lint pass. First contribution accepted for Hacktoberfest. One note on your test run: the Helm chart tests need the helm binary, which CONTRIBUTING does not list yet. That gap is on us, not you. |
2 tasks
18 tasks
cevheri
pushed a commit
that referenced
this pull request
Sep 6, 2026
getOverview() in both providers initialised databaseSizeBytes to 0 beside a databaseSize of "0 bytes", ran the size statement inside a try whose catch was empty, and returned the field unconditionally - so a statement that never answered published a measured-looking zero. StorageTab.tsx keys its whole breakdown off `databaseSizeBytes !== undefined`, so that fabricated 0 drew the breakdown over a database it never measured, against per-table bytes from getTableStats(), a separate read that does not share the failure. The field is now spread only when the statement answered, mirroring the activeConnections line two lines above it, and databaseSize moves with it - "N/A" while the bytes are unknown, as in the merged libSQL (#569) and search (#517) shapes, since both monitoring tabs render that string as the headline size. A genuine reading of 0 stays 0: the `|| 0` fold inside the try is deliberate, because an Oracle SUM over a schema that owns no segment is a measured zero rather than an unknown, so only the catch path leaves the field absent. Both provider test files pin the absence and the measured zero, and docs/providers/{mssql,oracle}.md gain a "7.3 When the database size is not measurable" section beside 7.1 and 7.2. Fixes #565 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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
databaseSizeas"N/A"and omitsdatabaseSizeBytesinstead of reporting0.Changes
databaseSizeBytesfrom libSQL overview only when page counters are readable.Testing
git diff --checknpm exec --yes --package bun@1.4.0 -- bun test tests/unit/db/libsql/introspect.test.ts— 26 pass, 0 failnpm exec --yes --package bun@1.4.0 -- bun test tests/unit/db/libsql tests/integration/db/libsql-provider.test.ts— 134 pass, 0 failnpm exec --yes --package bun@1.4.0 -- bun run format— checked 983 files, no fixes appliednpm exec --yes --package bun@1.4.0 -- bun run lint— exit code 0, existing warnings onlynpm exec --yes --package bun@1.4.0 -- bun run typecheck— exit code 0npm exec --yes --package bun@1.4.0 -- bun run test— blocked by environment: Helm is not installed, so Helm chart tests fail withExecutable not found in $PATH: "helm"; review evidence recorded 10108 pass, 355 fail, 6 errors before that tooling limitation stopped the full gate.Related Issue