diff --git a/go/vt/topo/tablet.go b/go/vt/topo/tablet.go index fcdce3195b7..10ba787a3c1 100644 --- a/go/vt/topo/tablet.go +++ b/go/vt/topo/tablet.go @@ -495,9 +495,9 @@ func (ts *Server) GetTabletMap(ctx context.Context, tabletAliases []*topodatapb. wg.Add(1) go func(tabletAlias *topodatapb.TabletAlias) { defer wg.Done() + tabletInfo, err := ts.GetTablet(ctx, tabletAlias) mu.Lock() defer mu.Unlock() - tabletInfo, err := ts.GetTablet(ctx, tabletAlias) if err != nil { log.Warningf("%v: %v", tabletAlias, err) // There can be data races removing nodes - ignore them for now.