From 3ba755139bcf2f3e5cc99cec8644b651ce102eec Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Tue, 5 Dec 2023 10:26:22 -0500 Subject: [PATCH] go/vt/topotools: restore logutil.logger Signed-off-by: Matt Layher --- go/vt/topotools/rebuild_keyspace.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/go/vt/topotools/rebuild_keyspace.go b/go/vt/topotools/rebuild_keyspace.go index d9a4440e1a8..09df8b8fadc 100644 --- a/go/vt/topotools/rebuild_keyspace.go +++ b/go/vt/topotools/rebuild_keyspace.go @@ -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 @@ -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 }