Skip to content

Commit

Permalink
field rename
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Aug 27, 2024
1 parent 0918c53 commit 0b5e181
Show file tree
Hide file tree
Showing 7 changed files with 1,653 additions and 1,651 deletions.
3,231 changes: 1,616 additions & 1,615 deletions go/vt/proto/vtctldata/vtctldata.pb.go

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions go/vt/proto/vtctldata/vtctldata_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ func (s *VtctldServer) EmergencyReparentShard(ctx context.Context, req *vtctldat
WaitReplicasTimeout: waitReplicasTimeout,
WaitAllTablets: req.WaitForAllTablets,
PreventCrossCellPromotion: req.PreventCrossCellPromotion,
CurrentPrimaryAlias: req.CurrentPrimary,
ExpectedPrimaryAlias: req.ExpectedPrimary,
},
)

Expand Down
6 changes: 3 additions & 3 deletions go/vt/vtctl/reparentutil/emergency_reparenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type EmergencyReparentOptions struct {
WaitAllTablets bool
WaitReplicasTimeout time.Duration
PreventCrossCellPromotion bool
CurrentPrimaryAlias *topodatapb.TabletAlias
ExpectedPrimaryAlias *topodatapb.TabletAlias

// Private options managed internally. We use value passing to avoid leaking
// these details back out.
Expand Down Expand Up @@ -166,8 +166,8 @@ func (erp *EmergencyReparenter) reparentShardLocked(ctx context.Context, ev *eve
}
ev.ShardInfo = *shardInfo

if opts.CurrentPrimaryAlias != nil && !topoproto.TabletAliasEqual(opts.CurrentPrimaryAlias, shardInfo.PrimaryAlias) {
return vterrors.Errorf(vtrpc.Code_FAILED_PRECONDITION, "current primary %q is not equal to %q", shardInfo.PrimaryAlias, opts.CurrentPrimaryAlias)
if opts.ExpectedPrimaryAlias != nil && !topoproto.TabletAliasEqual(opts.ExpectedPrimaryAlias, shardInfo.PrimaryAlias) {
return vterrors.Errorf(vtrpc.Code_FAILED_PRECONDITION, "primary %s is not equal to expected alias %s", shardInfo.PrimaryAlias, opts.ExpectedPrimaryAlias)
}

keyspaceDurability, err := erp.ts.GetKeyspaceDurability(ctx, keyspace)
Expand Down
5 changes: 3 additions & 2 deletions proto/vtctldata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,9 @@ message EmergencyReparentShardRequest {
// WaitForAllTablets makes ERS wait for a response from all the tablets before proceeding.
// Useful when all the tablets are up and reachable.
bool wait_for_all_tablets = 7;
// CurrentPrimary is the optional alias we require to be the current primary.
topodata.TabletAlias current_primary = 8;
// ExpectedPrimary is the optional alias we expect to be the current primary in order for
// the reparent request to succeed.
topodata.TabletAlias expected_primary = 8;
}

message EmergencyReparentShardResponse {
Expand Down
8 changes: 4 additions & 4 deletions web/vtadmin/src/proto/vtadmin.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions web/vtadmin/src/proto/vtadmin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b5e181

Please sign in to comment.