-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VTOrc: Cleanup node registration and unused code #15617
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,8 +75,6 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
query := ` | ||
SELECT | ||
vitess_tablet.info AS tablet_info, | ||
vitess_tablet.hostname, | ||
vitess_tablet.port, | ||
vitess_tablet.tablet_type, | ||
vitess_tablet.primary_timestamp, | ||
vitess_tablet.shard AS shard, | ||
|
@@ -87,9 +85,6 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
primary_instance.read_only AS read_only, | ||
MIN(primary_instance.gtid_errant) AS gtid_errant, | ||
MIN(primary_instance.alias) IS NULL AS is_invalid, | ||
MIN(primary_instance.data_center) AS data_center, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you explain why we don't need to store this any more? It's hard to see when you are reviewing a diff where we store the cell info which essentially provides the same functionality. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still store it, we just don't need to read it at this point, because it was unused. ERS code will read it anyways when it gets all the tablets from the shard. |
||
MIN(primary_instance.region) AS region, | ||
MIN(primary_instance.physical_environment) AS physical_environment, | ||
MIN(primary_instance.binary_log_file) AS binary_log_file, | ||
MIN(primary_instance.binary_log_pos) AS binary_log_pos, | ||
MIN(primary_tablet.info) AS primary_tablet_info, | ||
|
@@ -115,7 +110,6 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
OR substr(primary_instance.source_host, 1, 2) = '//' | ||
) | ||
) AS is_primary, | ||
MIN(primary_instance.is_co_primary) AS is_co_primary, | ||
MIN(primary_instance.gtid_mode) AS gtid_mode, | ||
COUNT(replica_instance.server_id) AS count_replicas, | ||
IFNULL( | ||
|
@@ -172,7 +166,6 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
MIN( | ||
primary_instance.semi_sync_replica_enabled | ||
) AS semi_sync_replica_enabled, | ||
SUM(replica_instance.is_co_primary) AS count_co_primary_replicas, | ||
SUM(replica_instance.oracle_gtid) AS count_oracle_gtid_replicas, | ||
IFNULL( | ||
SUM( | ||
|
@@ -331,15 +324,8 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
|
||
a.ShardPrimaryTermTimestamp = m.GetString("shard_primary_term_timestamp") | ||
a.IsPrimary = m.GetBool("is_primary") | ||
countCoPrimaryReplicas := m.GetUint("count_co_primary_replicas") | ||
a.IsCoPrimary = m.GetBool("is_co_primary") || (countCoPrimaryReplicas > 0) | ||
a.AnalyzedInstanceHostname = m.GetString("hostname") | ||
a.AnalyzedInstancePort = m.GetInt("port") | ||
a.AnalyzedInstanceAlias = topoproto.TabletAliasString(tablet.Alias) | ||
a.AnalyzedInstancePrimaryAlias = topoproto.TabletAliasString(primaryTablet.Alias) | ||
a.AnalyzedInstanceDataCenter = m.GetString("data_center") | ||
a.AnalyzedInstanceRegion = m.GetString("region") | ||
a.AnalyzedInstancePhysicalEnvironment = m.GetString("physical_environment") | ||
a.AnalyzedInstanceBinlogCoordinates = BinlogCoordinates{ | ||
LogFile: m.GetString("binary_log_file"), | ||
LogPos: m.GetUint32("binary_log_pos"), | ||
|
@@ -359,7 +345,6 @@ func GetReplicationAnalysis(keyspace string, shard string, hints *ReplicationAna | |
a.IsFailingToConnectToPrimary = m.GetBool("is_failing_to_connect_to_primary") | ||
a.ReplicationStopped = m.GetBool("replication_stopped") | ||
a.IsBinlogServer = m.GetBool("is_binlog_server") | ||
a.ClusterDetails.ReadRecoveryInfo() | ||
a.ErrantGTID = m.GetString("gtid_errant") | ||
|
||
countValidOracleGTIDReplicas := m.GetUint("count_valid_oracle_gtid_replicas") | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we removed that table. Where does this map to now? Is it helpful to document that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing, we don't store promotion rules in the tables anymore. They're gotten from the interface implementation.