perf: use explicit column lists in system.local/peers queries#724
perf: use explicit column lists in system.local/peers queries#724mykaul wants to merge 1 commit intoscylladb:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Optimizes topology discovery/control connection setup by replacing SELECT * system table reads with explicit column lists, reducing transferred data while still providing the fields consumed by hostInfoFromMap.
Changes:
- Replaced
qrySystemLocal,qrySystemPeers, andqrySystemPeersV2with explicit columnSELECTstatements. - Updated
ring_describer_test.gomocks/metadata to match the new result shapes and column ordering.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| conn.go | Switches system table queries from SELECT * to explicit column lists for peers/local discovery. |
| ring_describer_test.go | Updates mocked result metadata and row data to match the new explicit column projections. |
a038746 to
9ad7e14
Compare
9ad7e14 to
314b9b3
Compare
3e4fd8c to
f02f892
Compare
|
Force-pushed with the following changes:
|
Replace SELECT * with explicit column lists in qrySystemLocal, qrySystemPeers, and qrySystemPeersV2 to reduce the amount of data transferred from the server during topology discovery and control connection setup. Only columns actually consumed by hostInfoFromMap are now fetched. Add isScyllaConn() to ConnInterface so ring_describer can choose the correct peers query: Scylla omits preferred_ip (column does not exist), while Cassandra includes it. Remove dead DSE-specific case branches (workload, graph, dse_version) from hostInfoFromMap, since these columns are no longer queried. Deprecate Graph(), WorkLoad(), and DSEVersion() methods on HostInfo with doc comments, preserving backward API compatibility. Fix a stale comment in awaitSchemaAgreement that listed the scan column order incorrectly. This mirrors the same optimization done in the Python driver (scylladb/python-driver#528).
f02f892 to
826a9df
Compare
|
Follow-up force-push:
All unit tests pass. |
CI Failure AnalysisThe CI failure on Integration Tests On Scylla (LTS-PRIOR) is not caused by this PR's changes. Both failing tests are transient/flaky failures: 1.
|
Replace SELECT * with explicit column lists in qrySystemLocal, qrySystemPeers, and qrySystemPeersV2 to reduce the amount of data transferred from the server during topology discovery and control connection setup. Only columns actually consumed by hostInfoFromMap are now fetched.
This mirrors the same optimization done in the Python driver (scylladb/python-driver#528).