Skip to content

Commit

Permalink
Clean unnecessary code
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <[email protected]>
  • Loading branch information
beingnoble03 committed Feb 27, 2025
1 parent ff0f1ef commit 4921626
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func registerCommands(root *cobra.Command) {
// This will create the lookup vindex in the specified keyspace
// and setup a VReplication workflow to backfill its lookup table.
create.Flags().StringVar(&createOptions.Keyspace, "keyspace", "", "The keyspace to create the Lookup Vindex in. This is also where the table-owner must exist.")
base.MarkPersistentFlagRequired("keyspace")
create.MarkFlagRequired("keyspace")
create.Flags().StringVar(&createOptions.Type, "type", "", "The type of Lookup Vindex to create.")
create.Flags().StringVar(&createOptions.TableOwner, "table-owner", "", "The table holding the data which we should use to backfill the Lookup Vindex. This must exist in the same keyspace as the Lookup Vindex.")
create.Flags().StringSliceVar(&createOptions.TableOwnerColumns, "table-owner-columns", nil, "The columns to read from the owner table. These will be used to build the hash which gets stored as the keyspace_id value in the lookup table.")
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/lookup_vindex.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func newLookupVindex(ws *Server) *lookupVindex {
}
}

// prepareMultipleCreate performs the preparatory steps for creating a LookupVindex.
// prepareCreate performs the preparatory steps for creating a LookupVindex.
func (lv *lookupVindex) prepareCreate(ctx context.Context, workflow, keyspace string, specs *vschemapb.Keyspace, continueAfterCopyWithOwner bool) (
ms *vtctldatapb.MaterializeSettings, sourceVSchema, targetVSchema *topo.KeyspaceVSchemaInfo, cancelFunc func() error, err error) {
var (
Expand Down
11 changes: 1 addition & 10 deletions go/vt/vtctl/workflow/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,16 +604,7 @@ func (s *Server) LookupVindexCreate(ctx context.Context, req *vtctldatapb.Lookup

lv := newLookupVindex(s)

var (
ms *vtctldatapb.MaterializeSettings
sourceVSchema *topo.KeyspaceVSchemaInfo
targetVSchema *topo.KeyspaceVSchemaInfo
cancelFunc func() error
err error
)

ms, sourceVSchema, targetVSchema, cancelFunc, err = lv.prepareCreate(ctx, req.Workflow, req.Keyspace, req.Vindex, req.ContinueAfterCopyWithOwner)

ms, sourceVSchema, targetVSchema, cancelFunc, err := lv.prepareCreate(ctx, req.Workflow, req.Keyspace, req.Vindex, req.ContinueAfterCopyWithOwner)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 4921626

Please sign in to comment.