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.
When checking schema agreement driver uses
SELECT * FROM system.peersquery.It looks like the only use of columns other than
schema_versionis callingisPeerValidfunction.As far as I can tell it is still not necessary to select everything -
isPeerValidneedshost_idandpeer, and also callsPeerRowValidator::isValid.Is the call to
PeerRowValidator::isValidnecessary 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:
Not selecting
tokenswould be even better (because it contains even more data than supported_features), and this column is surely not needed to check schema agreement.