mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-22 15:52:13 +00:00
The paxos state queries (load_paxos_state, save_paxos_promise, etc.) were using page_size=-1 (no paging). While each query returns at most one row and paging never actually kicks in, the lack of paging causes these internal queries to be counted as non-paged reads in the metrics, which can be confusing to users monitoring their cluster. Add LIMIT 1 to the SELECT query so that may_need_paging() short-circuits to false (row_limit <= 1), avoiding pager allocation overhead entirely. Set page_size=1000 so these queries are no longer reported as non-paged reads. Refs: https://scylladb.atlassian.net/browse/CUSTOMER-372 Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com> Backport: no, improvement Closes scylladb/scylladb#29852