Add paging to ControlConnection topology queries #637
+35
−9
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.
Description
This PR fixes the issue where internal queries to
system.peersandsystem.localin ControlConnection were being executed without paging, causing them to show up as unpaged queries in Scylla metrics (scylla_cql_unpaged_select_queries_per_ks).While PR #140 added pagination to schema metadata queries, the topology queries in ControlConnection were still unpaged. This PR addresses that gap by adding the
fetch_sizeparameter to all QueryMessage instances in ControlConnection.Changes Made
fetch_sizeparameter to topology queries (system.peersandsystem.local) in_try_connect()methodfetch_sizeparameter to topology queries in_refresh_node_list_and_token_map()methodfetch_sizeparameter to local RPC address queryfetch_sizeparameter to schema agreement queries_schema_meta_page_sizeparameter (default: 1000) for consistency with schema metadata queriesfetch_sizeis properly set on all topology queriesTesting
test_topology_queries_use_pagingto verify fetch_size parameter is setThe changes are minimal and focused, ensuring backward compatibility while resolving the unpaged query issue.
Pre-review checklist
./docs/source/.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.