diff --git a/go/vt/vtorc/logic/tablet_discovery.go b/go/vt/vtorc/logic/tablet_discovery.go index a4a9a670076..af123eb9464 100644 --- a/go/vt/vtorc/logic/tablet_discovery.go +++ b/go/vt/vtorc/logic/tablet_discovery.go @@ -67,16 +67,12 @@ var ( ) func getTabletsWatchedByCell() map[string]int64 { - tabletsWatchedByCell := make(map[string]int64) - tabletsByCell, err := inst.ReadTabletCountsByCell() - if err == nil { + tabletsCountsByCell, err := inst.ReadTabletCountsByCell() + if err != nil { log.Errorf("Failed to read tablet counts by cell: %+v", err) - return tabletsWatchedByCell - } - for cell, tabletCount := range tabletsByCell { - tabletsWatchedByCell[cell] = tabletCount + return tabletsCountsByCell } - return tabletsWatchedByCell + return tabletsCountsByCell } // RegisterFlags registers the flags required by VTOrc