Skip to content

feat: Add session closed metric - #700

Open
KirillKurdyukov wants to merge 1 commit into
masterfrom
ydbappteam-1650-session-closed
Open

feat: Add session closed metric#700
KirillKurdyukov wants to merge 1 commit into
masterfrom
ydbappteam-1650-session-closed

Conversation

@KirillKurdyukov

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.62500% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.19%. Comparing base (ae5b7db) to head (293068d).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
...ain/java/tech/ydb/table/impl/pool/SessionPool.java 75.00% 1 Missing and 3 partials ⚠️
...src/main/java/tech/ydb/query/impl/SessionPool.java 96.00% 0 Missing and 1 partial ⚠️
...in/java/tech/ydb/table/impl/pool/WaitingQueue.java 93.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #700      +/-   ##
============================================
+ Coverage     71.88%   72.19%   +0.31%     
- Complexity     3475     3496      +21     
============================================
  Files           390      391       +1     
  Lines         16206    16309     +103     
  Branches       1698     1706       +8     
============================================
+ Hits          11649    11774     +125     
+ Misses         3906     3884      -22     
  Partials        651      651              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KirillKurdyukov
KirillKurdyukov force-pushed the ydbappteam-1650-session-closed branch 2 times, most recently from 7cc9fee to 58f0791 Compare August 13, 2026 08:00
Comment thread table/src/main/java/tech/ydb/table/impl/pool/StatefulSession.java Outdated
Comment thread table/src/main/java/tech/ydb/table/impl/pool/PoolMetrics.java
Comment thread query/src/main/java/tech/ydb/query/impl/SessionPool.java
Comment thread query/src/main/java/tech/ydb/query/impl/SessionPool.java Outdated
@robot-vibe-db

robot-vibe-db Bot commented Aug 13, 2026

Copy link
Copy Markdown

AI Review Summary

Verdict: ❌ 0 critical issues, 1 major issue found

Critical issues

No critical issues found.

Other findings

  • Major | Medium: Table pool sessions retired due to INTERNAL_ERROR never emit the new closed metric — the condition block in updateSessionState doesn't match INTERNAL_ERROR, so closeSession() is never called despite the session transitioning to BROKEN — table/…/StatefulSession.java:41-50
  • Minor | Medium: The "reason" attribute key in onSessionClosed() is unprefixed, unlike all other attribute keys in PoolMetrics which use the prefix (e.g. ydb.query.session.status_code) — table/…/PoolMetrics.java:83
  • Minor | Medium: Behavioural change — query pool no longer retires sessions on INTERNAL_ERROR (old code did). This diverges from the table pool, which still retires on INTERNAL_ERROR. Explicitly tested, but the inconsistency between pools could surprise users — query/…/SessionPool.java:181-208
  • Minor | Low: Early return on !isStarted in query pool updateSessionState still updates lastActive timestamp; harmless but asymmetric — query/…/SessionPool.java:182-183

This review was generated automatically. Critical issues require attention; other findings are advisory.
If this comment was useful, please give it a 👍 — it helps us improve the review bot.

@robot-vibe-db

robot-vibe-db Bot commented Aug 13, 2026

Copy link
Copy Markdown

Full analysis log

Analysis performed by claude, claude-opus-4-6.

@KirillKurdyukov
KirillKurdyukov force-pushed the ydbappteam-1650-session-closed branch from 416aed0 to 293068d Compare August 13, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant