Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

skip AddReplicaKey if it is specified in config.Config.DiscoveryIgnoreReplicaHostnameFilters #1096

Merged
merged 5 commits into from
Apr 28, 2020

Conversation

MaxFedotov
Copy link
Contributor

Hi @shlomi-noach.
As I understand, there is a special parameter in config DiscoveryIgnoreReplicaHostnameFilters, which is used especially to skip adding some replicas to Orchestrator (like different binlog dump routines). Right now, although replica is not added, it is still mentioned in slave_hosts field in database_instance table in Orchestrator DB, so API endpoints like /cluster/ still return such replicas in Json responses and it confuses all other services, which may rely on this data.

This PR prevents such situations, as all hosts specified in DiscoveryIgnoreReplicaHostnameFilters wouldn't be added to Orchestrator DB.

Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you -- this makes sense.

@shlomi-noach shlomi-noach merged commit 1b84075 into openark:master Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants