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

ha: add RelayConfig related function #1499

Merged
merged 2 commits into from
Mar 12, 2021
Merged

Conversation

lance6716
Copy link
Collaborator

What problem does this PR solve?

part of support start-relay of one source to many workers

What is changed and how it works?

add etcd key prefix, k/v: worker-name -> source-id

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has persistent data change

Side effects

  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release note

@lance6716 lance6716 added needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated status/PTAL This PR is ready for review. Add this label back after committing new changes labels Mar 11, 2021
@lance6716 lance6716 added this to the v2.0.2 milestone Mar 11, 2021
}

// GetRelayConfig returns the source config which the given worker need to pull relay log from etcd, with revision
func GetRelayConfig(cli *clientv3.Client, worker string) (*config.SourceConfig, int64, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

almost same with

// GetSourceBoundConfig gets the source bound relationship and relative source config at the same time

Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

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

Will one worker be bound with several relay sources?
Rest LGTM

@lance6716
Copy link
Collaborator Author

lance6716 commented Mar 11, 2021

Will one worker be bound with several relay sources?

currently not. User may need to deploy more worker if he want to increase relay replica number

@lichunzhu
Copy link
Contributor

/lgtm

@ti-srebot ti-srebot added the status/LGT1 One reviewer already commented LGTM label Mar 12, 2021
Copy link
Collaborator

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

lgtm

@lance6716 lance6716 merged commit 603e2b8 into pingcap:master Mar 12, 2021
ti-srebot pushed a commit to ti-srebot/dm that referenced this pull request Mar 12, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link

cherry pick to release-2.0 in PR #1505

@ti-srebot ti-srebot added already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked and removed needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 labels Mar 12, 2021
lance6716 pushed a commit that referenced this pull request Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated status/LGT1 One reviewer already commented LGTM status/PTAL This PR is ready for review. Add this label back after committing new changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants