Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Dec 10, 2024
1 parent 33587be commit ae75575
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 1 addition & 7 deletions go/vt/vtorc/logic/tablet_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,14 @@ func OpenTabletDiscovery() <-chan time.Time {
if _, err := db.ExecVTOrc("delete from vitess_tablet"); err != nil {
log.Error(err)
}
<<<<<<< HEAD
// We refresh all information from the topo once before we start the ticks to do it on a timer.
populateAllInformation()
return time.Tick(time.Second * time.Duration(config.Config.TopoInformationRefreshSeconds)) //nolint SA1015: using time.Tick leaks the underlying ticker
=======
// We refresh all information from the topo once before we start the ticks to do
// it on a timer.
ctx, cancel := context.WithTimeout(context.Background(), topo.RemoteOperationTimeout)
defer cancel()
if err := refreshAllInformation(ctx); err != nil {
log.Errorf("failed to initialize topo information: %+v", err)
}
return time.Tick(config.GetTopoInformationRefreshDuration()) //nolint SA1015: using time.Tick leaks the underlying ticker
>>>>>>> 91811154ac (`vtorc`: require topo for `Healthy: true` in `/debug/health` (#17129))
return time.Tick(time.Second * time.Duration(config.Config.TopoInformationRefreshSeconds)) //nolint SA1015: using time.Tick leaks the underlying ticker
}

// refreshAllTablets reloads the tablets from topo and discovers the ones which haven't been refreshed in a while
Expand Down
8 changes: 3 additions & 5 deletions go/vt/vtorc/logic/vtorc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
package logic

import (
<<<<<<< HEAD
"context"
"os"
"os/signal"
=======
"context"
>>>>>>> 91811154ac (`vtorc`: require topo for `Healthy: true` in `/debug/health` (#17129))
"sync"
"sync/atomic"
"syscall"
Expand Down Expand Up @@ -335,7 +332,8 @@ func ContinuousDiscovery() {
go inst.SnapshotTopologies()
}()
case <-tabletTopoTick:
ctx, cancel := context.WithTimeout(context.Background(), config.GetTopoInformationRefreshDuration())
timeout := time.Second * time.Duration(config.Config.TopoInformationRefreshSeconds)
ctx, cancel := context.WithTimeout(context.Background(), timeout)
if err := refreshAllInformation(ctx); err != nil {
log.Errorf("failed to refresh topo information: %+v", err)
}
Expand Down

0 comments on commit ae75575

Please sign in to comment.