Skip to content

Commit

Permalink
terminology: remove 'MySQL' where irrelevant
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach committed Jul 11, 2024
1 parent 3423780 commit 1f584a1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions go/vt/vttablet/tabletserver/throttle/throttler.go
Original file line number Diff line number Diff line change
Expand Up @@ -861,10 +861,10 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) {
return t
}
leaderCheckTicker := addTicker(throttler.leaderCheckInterval)
mysqlCollectTicker := addTicker(throttler.activeCollectInterval)
mysqlDormantCollectTicker := addTicker(throttler.dormantCollectInterval)
mysqlRefreshTicker := addTicker(throttler.inventoryRefreshInterval)
mysqlAggregateTicker := addTicker(throttler.metricsAggregateInterval)
activeCollectTicker := addTicker(throttler.activeCollectInterval)
dormantCollectTicker := addTicker(throttler.dormantCollectInterval)
inventoryRefreshTicker := addTicker(throttler.inventoryRefreshInterval)
metricsAggregateTicker := addTicker(throttler.metricsAggregateInterval)
throttledAppsTicker := addTicker(throttler.throttledAppsSnapshotInterval)
primaryStimulatorRateLimiter := timer.NewRateLimiter(throttler.dormantPeriod)
throttler.recentCheckRateLimiter = timer.NewRateLimiter(recentCheckRateLimiterInterval)
Expand Down Expand Up @@ -923,11 +923,11 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) {

if transitionedIntoLeader {
// transitioned into leadership, let's speed up the next 'refresh' and 'collect' ticks
go mysqlRefreshTicker.TickNow()
go inventoryRefreshTicker.TickNow()
throttler.requestHeartbeats()
}
}()
case <-mysqlCollectTicker.C:
case <-activeCollectTicker.C:
if throttler.IsOpen() {
// frequent
// Always collect self metrics:
Expand Down Expand Up @@ -955,30 +955,30 @@ func (throttler *Throttler) Operate(ctx context.Context, wg *sync.WaitGroup) {
}

}
case <-mysqlDormantCollectTicker.C:
case <-dormantCollectTicker.C:
if throttler.IsOpen() {
// infrequent
if throttler.isDormant() {
throttler.collectShardMetrics(ctx, tmClient)
}
}
case metric := <-throttler.throttleMetricChan:
// incoming MySQL metric, frequent, as result of collectMySQLMetrics()
// incoming metric, frequent, as result of collectMetrics()
metricResultsMap, ok := throttler.inventory.TabletMetrics[metric.GetTabletAlias()]
if !ok {
metricResultsMap = base.NewMetricResultMap()
throttler.inventory.TabletMetrics[metric.GetTabletAlias()] = metricResultsMap
}
metricResultsMap[metric.Name] = metric
case <-mysqlRefreshTicker.C:
case <-inventoryRefreshTicker.C:
// sparse
if throttler.IsOpen() {
throttler.refreshInventory(ctx)
}
case probes := <-throttler.clusterProbesChan:
// incoming structural update, sparse, as result of refreshInventory()
throttler.updateClusterProbes(ctx, probes)
case <-mysqlAggregateTicker.C:
case <-metricsAggregateTicker.C:
if throttler.IsOpen() {
throttler.aggregateMetrics()
}
Expand Down

0 comments on commit 1f584a1

Please sign in to comment.