Skip to content

Commit

Permalink
go/vt/topotools: restore logutil.logger
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <[email protected]>
  • Loading branch information
mdlayher committed Dec 5, 2023
1 parent db27983 commit 3ba7551
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions go/vt/topotools/rebuild_keyspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ import (
)

// RebuildKeyspace rebuilds the serving graph data while locking out other changes.
func RebuildKeyspace(ctx context.Context, _ logutil.Logger, ts *topo.Server, keyspace string, cells []string, allowPartial bool) (err error) {
// TODO: logutil.Logger is unused, clean up call sites.

func RebuildKeyspace(ctx context.Context, log logutil.Logger, ts *topo.Server, keyspace string, cells []string, allowPartial bool) (err error) {
ctx, unlock, lockErr := ts.LockKeyspace(ctx, keyspace, "RebuildKeyspace")
if lockErr != nil {
return lockErr
}
defer unlock(&err)

return RebuildKeyspaceLocked(ctx, ts, keyspace, cells, allowPartial)
return RebuildKeyspaceLocked(ctx, log, ts, keyspace, cells, allowPartial)
}

// RebuildKeyspaceLocked should only be used with an action lock on the keyspace
Expand All @@ -48,7 +46,7 @@ func RebuildKeyspace(ctx context.Context, _ logutil.Logger, ts *topo.Server, key
//
// Take data from the global keyspace and rebuild the local serving
// copies in each cell.
func RebuildKeyspaceLocked(ctx context.Context, ts *topo.Server, keyspace string, cells []string, allowPartial bool) error {
func RebuildKeyspaceLocked(ctx context.Context, log logutil.Logger, ts *topo.Server, keyspace string, cells []string, allowPartial bool) error {
if err := topo.CheckKeyspaceLocked(ctx, keyspace); err != nil {
return err
}
Expand Down

0 comments on commit 3ba7551

Please sign in to comment.