Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

make start-relay easier to use #2241

Open
lance6716 opened this issue Oct 19, 2021 · 5 comments
Open

make start-relay easier to use #2241

lance6716 opened this issue Oct 19, 2021 · 5 comments

Comments

@lance6716
Copy link
Collaborator

lance6716 commented Oct 19, 2021

Is your feature request related to a problem? Please describe

  1. I want to start relay to reduce the number of upstream binlog replication slaves, not care about which worker started relay so don't want to specify worker name. Currently I must specify worker name of the source is bound or free
  2. I want to specify the position from which the relay is pulling. Currently this is specified in source configuration file, which is hard to modify

Describe the feature you'd like

  1. start-relay -s <source-id>, stop-relay -s <source-id> to let current and future bound workers use relay to replicate.
    and this feature is exclusive from start-relay -s <source-id> <worker-names>, which means
    start-relay -s source1         # now DM will start relay for current and future bound workers
    start-relay -s source1 worker2 # DM will raise error: "this source has automatically started relay for bound worker, can't specify worker using relay now"
    stop-relay -s source1 worker1  # DM will raise error: "this source has automatically started relay for bound worker, can't specify worker stopping relay now"
    stop-relay -s source1          # now DM will stop relay for current and future bound workers
    start-relay -s source1 worker2 # DM will let worker2 pull relay log of source1
    start-relay -s source1         # DM will raise error: "this source has started relay for specified worker [worker1], can't automatically started relay for bound worker now"
    stop-relay -s source1          # DM will raise error: "this source has started relay for specified worker [worker1], can't automatically stop relay for bound worker now"
    stop-relay -s source1 worker2  # success
    
  2. start-relay -s <source-id> <worker-name> --binlog-file <filename> --binlog-pos <position> or start-relay -s <source-id> <worker-name> --binlog-gtid <gtid set>

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

@lance6716
Copy link
Collaborator Author

PTAL @sunzhaoyang

@lance6716
Copy link
Collaborator Author

and for #2205, I'm requesting

  1. start-relay --all --on-bound, stop-relay --all --on-bound

@lichunzhu
Copy link
Contributor

I prefer start-relay -s <source-name> [worker-name]. If worker-name is not specified, start-relay for all source-name bound workers.

@Ehco1996
Copy link
Contributor

I prefer start-relay -s <source-name> [worker-name]. If worker-name is not specified, start-relay for all source-name bound workers.

what is "for all source-name bound workers" ? does this mean that all worker that have bound this source?

@lance6716
Copy link
Collaborator Author

updated the issue description

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants