Skip to content

Commit

Permalink
Merge pull request #7422 from planetscale/throttle-client-fix-primary…
Browse files Browse the repository at this point in the history
…-writes

Throttler: fix to client usage in vreplication and table GC
  • Loading branch information
rohit-nayak-ps committed Feb 4, 2021
2 parents 4689c0f + 51276da commit 11f0f30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletmanager/vreplication/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func NewEngine(config *tabletenv.TabletConfig, ts *topo.Server, cell string, mys
mysqld: mysqld,
journaler: make(map[string]*journalEvent),
ec: newExternalConnector(config.ExternalConnections),
throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerAppName, throttle.ThrottleCheckSelf),
throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerAppName, throttle.ThrottleCheckPrimaryWrite),
}
return vre
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/gc/tablegc.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type GCStatus struct {
// NewTableGC creates a table collector
func NewTableGC(env tabletenv.Env, ts *topo.Server, tabletTypeFunc func() topodatapb.TabletType, lagThrottler *throttle.Throttler) *TableGC {
collector := &TableGC{
throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerAppName, throttle.ThrottleCheckSelf),
throttlerClient: throttle.NewBackgroundClient(lagThrottler, throttlerAppName, throttle.ThrottleCheckPrimaryWrite),
isPrimary: 0,
isOpen: 0,

Expand Down

0 comments on commit 11f0f30

Please sign in to comment.