Skip to content

4.x: Don't use overly broad SELECTs when checking schema agreement #468

Description

@Lorak-mmk

When checking schema agreement driver uses SELECT * FROM system.peers query.

It looks like the only use of columns other than schema_version is calling isPeerValid function.
As far as I can tell it is still not necessary to select everything - isPeerValid needs host_id and peer, and also calls PeerRowValidator::isValid.

Is the call to PeerRowValidator::isValid necessary for checking schema agreement? I don't know, my suspicion is that it is not.

Even if this call is necessary, there are columns that are not used even by this validation and thus can surely be not selected:

  • preferred_ip
  • release_version
  • supported_features (this is an important one because it contains a lot of data)

Not selecting tokens would be even better (because it contains even more data than supported_features), and this column is surely not needed to check schema agreement.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions