Skip to content

feat(admin): Fold shared-node storages and skip host words in node search - #8680

Merged
onewland merged 5 commits into
masterfrom
feat/admin-node-search-eap-refinements
Nov 10, 2026
Merged

onewland merged 5 commits into
masterfrom
feat/admin-node-search-eap-refinements

Conversation

@onewland

@onewland onewland commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Two refinements to the System Queries node search from #8609, based on how production hostnames and storages actually look.

Folding storages that share nodes. In production, many storages use the same nodes, so the storage line under each node and the storage pickers repeat the same cluster under many names. Storage lists now show one storage per storage set. A storage set belongs to exactly one cluster (snuba/clusters/cluster.py asserts it), so its storages always share their nodes. /clickhouse_nodes now reports each storage's storage_set, and the shortest name in each set stands in for the rest:

Storage set Shown as
events_analytics_platform eap_items (for eap_items_2, the downsample_* ones, eap_item_co_occurring_attrs, …)
events_analytics_platform_ro eap_items_ro (for the _ro versions)
outcomes outcomes_raw (for outcomes_hourly, outcomes_daily, outcomes_cross_org_hourly, llm_proxy_cost_raw)
metrics metrics_raw (for metrics_counters, metrics_distributions, metrics_sets, org_metrics_counters)
functions functions
replays replays

Folding only changes what's listed:

  • The representative is picked from the storages in the list, so a node that lists eap_items_2 but not eap_items shows eap_items_2.
  • The selected storage always stays in the picker, so links to e.g. eap_items_downsample_8 still work.
  • The storage sent with a query is still chosen from all of the node's storages.

The first commit hard-coded this for eap_items and outcomes by name. The second replaces that with the storage set, which the config already maintains, so new storages fold without any change here. I considered an admin-only alias or hide flag in the storage YAML. It would mostly repeat what set_key already says, and it needs a schema change and flags on about 20 storages. If a real exception comes up, a small hidden override would be enough.

Skipping a host word. Hosts like snuba-events-analytics-platform-arm-1-1 and …-mz-1-1 matched eap-arm-1-1 but not eap-1-1. A typed separator can now skip one whole host word that starts with a letter:

  • Each skipped word counts as a boundary miss, so exact …-1-1 hosts still rank first.
  • Number words (shards, replicas, ports) are never skipped. Otherwise eap-1 would match every replica-1 host.

NODE_SEARCH.md documents both rules, with new rows in its examples table.

🤖 Generated with Claude Code

…arch

In production, many storages use the same nodes, which made the storage
lists long and repetitive. Every eap_items storage (downsampled,
co-occurring attributes, ...) now shows as eap_items, or eap_items_ro
for the read-only ones, and the outcomes storage set shows as
outcomes_raw. That applies to the storage line under each node and to
the storage pickers. The selected storage is always kept in the picker,
and the storage sent with a query is still chosen from all of the
node's storages.

Hosts like snuba-events-analytics-platform-arm-1-1 and ...-mz-1-1 didn't
match eap-1-1. A typed separator can now skip one whole host word that
starts with a letter, counted as a boundary miss so exact hosts rank
first. Number words (shards, replicas, ports) are never skipped, so
their positions still count.

Co-Authored-By: Claude <noreply@anthropic.com>
@onewland
onewland marked this pull request as ready for review November 6, 2026 15:22
@onewland
onewland requested a review from a team as a code owner November 6, 2026 15:22
onewland and others added 4 commits November 6, 2026 07:29
The eap_items and outcomes folding hard-coded which storages share
nodes. The storage configuration already says this: a storage set
belongs to exactly one cluster (snuba/clusters/cluster.py asserts it),
so its storages always share their nodes. /clickhouse_nodes now reports
each storage's set, and storage lists show the shortest name in each
set. That gives the same result for eap_items, eap_items_ro and
outcomes_raw, also folds the metrics, functions and replays sets, and
picks up new storages without any change here.

Co-Authored-By: Claude <noreply@anthropic.com>
In distributed mode /clickhouse_nodes looks up cluster topology in
ClickHouse, which the test harness blocks unless the test is marked.

Co-Authored-By: Claude <noreply@anthropic.com>
…etsentry/snuba into feat/admin-node-search-eap-refinements
@onewland
onewland merged commit b6a852d into master Nov 10, 2026
71 checks passed
@onewland
onewland deleted the feat/admin-node-search-eap-refinements branch November 10, 2026 00:28
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.

2 participants