Skip to content

Split metadata parsing into Scylla and Cassandra implementations #1247

Description

@dkropachev

Follow-up to #1159 and the metadata-discovery changes in #1242.

Problem

Metadata parsing shares a version-based schema parser hierarchy, while product-specific metadata query selection also lives in ControlConnection. The schema parser selector selects a parser by release major version; the local metadata query selector separately checks server capabilities and chooses columns.

The port-discovery fix illustrates the distinction: Cassandra 4+ exposes local broadcast/RPC port columns that Scylla does not provide. Supporting both requires compatible bootstrap queries, an optional column probe, and fallback handling. Product-specific rules are therefore spread across query construction and metadata parsing.

Expected behavior

Introduce separate Scylla and Cassandra metadata parser implementations behind a common interface, sharing common parsing machinery where appropriate. Each implementation should own its product-specific system-table queries, supported columns, and interpretation.

Define server/product selection and a safe fallback when identity or capabilities are incomplete; a release major version alone should not establish that the server is Cassandra.

Preserve public APIs, supported server compatibility, and the behavior covered by #1159 and #1242, including token-metadata options, parallel peers/local refresh requests, and connection-scoped fallback for unsupported columns. Cover parser selection, query projections, and metadata discovery/refresh with unit tests and appropriate Scylla/Cassandra integration tests.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions