Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
FYI: preparing new release |
cevheri
left a comment
There was a problem hiding this comment.
Thanks, Jared. The direction is right and the tests are solid: every new assertion fails on the old code. A few changes before I can merge it.
-
Rebase on main. The branch conflicts with main in
src/lib/api/object-route.ts, only in a docblock's line pointers, and main has moved a lot since your CI run. Pinning line numbers there is our mistake. Rebase and re-measure those pointers against the mergedpostgres.tsandredis.tsrather than taking either side.
Done when: the PR shows no conflicts and the required checks are green on the rebased head. -
Oracle counts on-CPU sessions as waiting. When a session is not in a wait,
V$SESSIONkeeps its last wait inEVENTandWAIT_CLASS, so an ACTIVE session on CPU whose last wait was User I/O reads as waiting. There is noCPUwait class. Selects.STATEand count waiting only forACTIVEwithSTATE = 'WAITING'and a class other than Idle. Update thedocs/providers/oracle.mdrow.
Done when: a provider test with a realistic row (ACTIVE,WAITED SHORT TIME,User I/O) readsactive, and one withSTATE = 'WAITING'readswaiting. -
Five engines regress to N/A. MongoDB, SQLite, ClickHouse, Databend and Neo4j already counted Active and Idle correctly on main, and now read N/A because they set no
activity. Set it in each provider, with its doc row and provider test (the provider triad in CLAUDE.md), and fix the Databend and Neo4j docblocks that still say the panels countstate.
Done when: each of the five has a provider test assertingactivity, and the panels show counts for them, not N/A. -
Operations refused read is untested. Flipping the unavailable argument in
OperationsTab.tsxkeeps every test green.
Done when:OperationsTab.test.tsxasserts the four cards read N/A on a refused read, and that test fails if the argument is flipped.
|
I'm working on a VS Code extension for LibreDB Studio. I'll review the open PRs once it's ready. https://marketplace.visualstudio.com/items?itemName=libredb.libredb-studio |
|
any update for CR |
Cards were matching PostgreSQL status words, so every other engine read 0. A session now carries the card it belongs on, and a list that was not classified reads N/A.
Query is active, Sleep is idle, and every other command stays other, with the raw command left on the row.
INACTIVE is idle, and ACTIVE counts as waiting only for a wait class other than Idle or CPU.
Sleeping and dormant are idle, suspended is waiting, and running counts as waiting only while wait_type is set.
An idle client wait stays idle, a lock wait counts as waiting, and pooled connections named libredb-studio are left out of the session list. Duration is measured to clock_timestamp() so it cannot read below zero.
A CLIENT LIST flag string containing b is waiting. Every other flag, including the N fallback, is idle.
aff1d53 to
fc5d15a
Compare
|
Thank you for the reviews. Just got the chance to address the CRs.
|
Description
The Active, Idle, In TX, and Wait cards counted PostgreSQL's
pg_stat_activitywords (active,idle,idle in transaction, and anywaitEventType). Other engines pass their own status text through, so the cards read 0 above a list of real sessions. On PostgreSQL an idle backend waiting onClient/ClientReadwas counted as waiting, and Studio's other pooled monitoring connections were listed as user sessions.Type of Change
Related Issue
Closes #1426
Changes Made
ActiveSessionDetails.activityis the card a session belongs on (active,idle,idle-in-transaction,waiting,other). The engine's own word stays instatefor the row.activity. A refused read, and a list that never classifies, both read N/A. An empty list still reads 0.COMMAND(Queryactive,Sleepidle, anything elseother). Oracle classifiesSTATUS(INACTIVEidle;ACTIVEis waiting only for a wait class other thanIdleorCPU). SQL Server classifiesstatus(sleepinganddormantidle,suspendedwaiting,runningorrunnablewaiting only whilewait_typeis set). Redis classifiesCLIENT LISTflags (bwaiting, every other flag includingNidle).activesession whosewait_event_typeis set and is notClient. The pool setsapplication_nametolibredb-studio, andgetActiveSessions()leaves those connections out.clock_timestamp(), so a statement that started after the reading transaction does not read below zero.activityon those four engines; PostgreSQL (an idle client wait stays idle, a lock wait is waiting, Studio's ownapplication_nameis filtered out).Testing
Test Environment
Screenshots (if applicable)
Checklist
bun run test:coverageandbun run coverage:check)src/lib/db/providers/, I updated the matchingdocs/providers/documentation andtests/integration/db/tests in the same PR (provider triad)Additional Notes
Engines that do not set
activitykeep showing N/A on these cards rather than a 0 that looks like a measurement. That includes engines whosestatealready used the wordsactiveandidle: MongoDB (active/idlefrom the operation), SQLite and ClickHouse (every listed session isactive), and Databend and Neo4j (QueryandRunningrewritten toactive, with any other status left as its own word).