Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Jun 12, 2024
1 parent 52c1e83 commit adb5543
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/pd_service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func (c *pdServiceDiscovery) SetTSOGlobalServURLUpdatedCallback(callback tsoGlob
url := c.getLeaderURL()
if len(url) > 0 {
if err := callback(url); err != nil {
log.Error("[tso] failed to call callback", errs.ZapError(err))
log.Error("[tso] failed to call back when tso global service url update", zap.String("url", url), errs.ZapError(err))

Check warning on line 809 in client/pd_service_discovery.go

View check run for this annotation

Codecov / codecov/patch

client/pd_service_discovery.go#L809

Added line #L809 was not covered by tests
}
}
c.tsoGlobalAllocLeaderUpdatedCb = callback
Expand Down
2 changes: 1 addition & 1 deletion client/resource_manager_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (c *client) handleResourceTokenDispatcher(dispatcherCtx context.Context, tb
if toReconnect {
connection.reset()
if err := c.tryResourceManagerConnect(dispatcherCtx, &connection); err != nil {
log.Error("[resource_manager] try connect leader failed", errs.ZapError(err))
log.Error("[resource_manager] try to connect token leader failed", errs.ZapError(err))

Check warning on line 323 in client/resource_manager_client.go

View check run for this annotation

Codecov / codecov/patch

client/resource_manager_client.go#L323

Added line #L323 was not covered by tests
}
log.Info("[resource_manager] token leader may change, try to reconnect the stream")
stream, streamCtx = connection.stream, connection.ctx
Expand Down
2 changes: 1 addition & 1 deletion client/tso_service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (c *tsoServiceDiscovery) SetTSOGlobalServURLUpdatedCallback(callback tsoGlo
url := c.getPrimaryURL()
if len(url) > 0 {
if err := callback(url); err != nil {
log.Error("[tso] failed to call callback", errs.ZapError(err))
log.Error("[tso] failed to call back when tso global service url update", zap.String("url", url), errs.ZapError(err))

Check warning on line 372 in client/tso_service_discovery.go

View check run for this annotation

Codecov / codecov/patch

client/tso_service_discovery.go#L371-L372

Added lines #L371 - L372 were not covered by tests
}
}
c.globalAllocPrimariesUpdatedCb = callback
Expand Down
2 changes: 1 addition & 1 deletion pkg/mcs/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func StopHTTPServer(s server) {
go func() {
defer close(ch)
if err := s.GetHTTPServer().Shutdown(ctx); err != nil {
log.Warn("http server graceful shutdown failed", errs.ZapError(err))
log.Error("http server graceful shutdown failed", errs.ZapError(err))

Check warning on line 270 in pkg/mcs/utils/util.go

View check run for this annotation

Codecov / codecov/patch

pkg/mcs/utils/util.go#L270

Added line #L270 was not covered by tests
}
}()

Expand Down
4 changes: 2 additions & 2 deletions pkg/replication/replication_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ func (m *ModeManager) drSwitchToAsyncWait(availableStores []uint64) error {
return nil
}

func (m *ModeManager) drSwitchToAsync(availableStores []uint64) {
func (m *ModeManager) drSwitchToAsync(availableStores []uint64) error {
m.Lock()
defer m.Unlock()
_ = m.drSwitchToAsyncWithLock(availableStores)
return m.drSwitchToAsyncWithLock(availableStores)
}

func (m *ModeManager) drSwitchToAsyncWithLock(availableStores []uint64) error {
Expand Down

0 comments on commit adb5543

Please sign in to comment.