Skip to content

Commit

Permalink
VindexUnknown -> UnknownVindex
Browse files Browse the repository at this point in the history
Signed-off-by: Max Englander <max@planetscale.com>
  • Loading branch information
maxenglander committed Dec 5, 2023
1 parent d7ea29e commit ed28671
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion go/cmd/vtctldclient/command/vschemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func commandApplyVSchema(cmd *cobra.Command, args []string) error {
return err
}
fmt.Printf("New VSchema object:\n%s\nIf this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).\n", vsData)
for vdxName, ups := range res.VindexUnknownParams {
for vdxName, ups := range res.UnknownVindexParams {
for _, param := range ups.Params {
fmt.Printf("Unknown param in vindex %s: %s\n", vdxName, param)
}
Expand Down
26 changes: 13 additions & 13 deletions go/vt/proto/vtctldata/vtctldata.pb.go

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

22 changes: 11 additions & 11 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.

8 changes: 4 additions & 4 deletions go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func (s *VtctldServer) ApplyVSchema(ctx context.Context, req *vtctldatapb.ApplyV
}

// Attach unknown Vindex params to the response.
vindexUnknownParams := make(map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList)
unknownVindexParams := make(map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList)
var vdxNames []string
for name := range ksVs.Vindexes {
vdxNames = append(vdxNames, name)
Expand All @@ -384,14 +384,14 @@ func (s *VtctldServer) ApplyVSchema(ctx context.Context, req *vtctldatapb.ApplyV
if len(ups) == 0 {
continue
}
vindexUnknownParams[name] = &vtctldatapb.ApplyVSchemaResponse_ParamList{Params: ups}
unknownVindexParams[name] = &vtctldatapb.ApplyVSchemaResponse_ParamList{Params: ups}
}
}

if req.DryRun { // we return what was passed in and parsed, rather than current
return &vtctldatapb.ApplyVSchemaResponse{
VSchema: vs,
VindexUnknownParams: vindexUnknownParams,
UnknownVindexParams: unknownVindexParams,
}, nil
}

Expand All @@ -413,7 +413,7 @@ func (s *VtctldServer) ApplyVSchema(ctx context.Context, req *vtctldatapb.ApplyV
}
return &vtctldatapb.ApplyVSchemaResponse{
VSchema: updatedVS,
VindexUnknownParams: vindexUnknownParams,
UnknownVindexParams: unknownVindexParams,
}, nil
}

Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtctl/grpcvtctldserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func TestApplyVSchema(t *testing.T) {
},
},
},
VindexUnknownParams: map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList{
UnknownVindexParams: map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList{
"lookup1": {
Params: []string{"goodbye", "hello"},
},
Expand Down Expand Up @@ -499,7 +499,7 @@ func TestApplyVSchema(t *testing.T) {
},
},
},
VindexUnknownParams: map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList{
UnknownVindexParams: map[string]*vtctldatapb.ApplyVSchemaResponse_ParamList{
"lookup1": {
Params: []string{"goodbye", "hello"},
},
Expand Down
2 changes: 1 addition & 1 deletion proto/vtctldata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ message ApplyVSchemaRequest {

message ApplyVSchemaResponse {
vschema.Keyspace v_schema = 1;
map<string, ParamList> vindex_unknown_params = 2;
map<string, ParamList> unknown_vindex_params = 2;

message ParamList {
repeated string params = 1;
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.

Loading

0 comments on commit ed28671

Please sign in to comment.