Skip to content
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

[vtctl/workflow] More trafficswitcher extraction #9007

Merged
merged 8 commits into from
Oct 20, 2021

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Oct 16, 2021

Description

This PR continues to move things from wrangler.trafficSwitcher into the interface type in vtctl/workflow. The goal here is to make git grep -E "ts\.[a-z]" -- go/vt/wrangler empty (where ts is a trafficSwitcher, not a topo.Server 😅 ); in other words to have wrangler's use of traffic switcher be "public functions/fields only"; at that point we can cut-paste the trafficSwitcher from package wrangler to package workflow in a single, easy-to-review change. Then we can begin peeling off the vdiff code to be used in the new grpcvtctldserver

I also cleaned up some references to MasterPosition while I was here.

Related Issue(s)

#7931

Checklist

  • Should this PR be backported? no
  • Tests were added or are not required n/a
  • Documentation was added or is not required

Deployment Notes

…r+wrangler

This will make the eventual move of trafficswitcher into `package
workflow` simpler and smaller in scope

Signed-off-by: Andrew Mason <amason@slack-corp.com>
This should only be temporarily exported

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
… cleanup

Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 force-pushed the more_trafficswitcher_extraction branch from 8f3d68f to 846f83f Compare October 18, 2021 10:27
@@ -773,7 +773,7 @@ func (df *vdiff) syncTargets(ctx context.Context, filteredReplicationWaitTime ti
}

err = df.forAll(df.targets, func(shard string, target *shardStreamer) error {
pos, err := df.ts.wr.tmc.MasterPosition(ctx, target.primary.Tablet)
pos, err := df.ts.TabletManagerClient().PrimaryPosition(ctx, target.primary.Tablet)
Copy link
Member

Choose a reason for hiding this comment

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

Should be fine since this will only go into 13.0 and we introduce PrimaryPosition in 12.0

@ajm188 ajm188 merged commit 89e7288 into vitessio:main Oct 20, 2021
@ajm188 ajm188 deleted the more_trafficswitcher_extraction branch October 20, 2021 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants