Skip to content

Conversation

@Ev3nt
Copy link
Contributor

@Ev3nt Ev3nt commented Oct 28, 2025

The goal of this PR is to utilize new scope tags in isql. Now when using SET STATS we got this table of stats scopes:

Tag Scope
isc_info_fetches fb_info_counts_scope_att
isc_info_marks fb_info_counts_scope_att
isc_info_reads fb_info_counts_scope_att
isc_info_writes fb_info_counts_scope_att
isc_info_current_memory fb_info_counts_scope_db
isc_info_max_memory fb_info_counts_scope_db

This change fixes the old issue with ISQL reporting unstable (depending on the concurrent load) page-level counters in the execution statistics.

@aafemt
Copy link
Contributor

aafemt commented Oct 28, 2025

Not synchronized access to a global variable. Completely unnecessary additional round-trip. Not good, IMHO.

@dyemanov
Copy link
Member

Completely unnecessary additional round-trip.

Do you suggest a try-except loop (first iteration with scopes, second without)?

@aafemt
Copy link
Contributor

aafemt commented Oct 28, 2025

Do you suggest a try-except loop (first iteration with scopes, second without)?

Unknown info items don't throw, there is no need in try-catch. isc_info_error is already handled, so if server doesn't support scopes, they will be silently skipped by existing code and result will be exactly the same as before.

All that is needed is to add scope tags to the request buffer. They are cheap, so even optimization by grouping counters might be unnecessary, just fill the buffer with scope,tag pairs from the table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants