Skip to content

Commit

Permalink
*: fix some typos (#5165)
Browse files Browse the repository at this point in the history
ref #4820

Fix some typos.

Signed-off-by: LLThomas <[email protected]>
  • Loading branch information
LLThomas authored Jun 15, 2022
1 parent 0da658c commit ee302fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1409,20 +1409,20 @@ func (s *Server) campaignLeader() {
go s.member.KeepLeader(ctx)
log.Info("campaign pd leader ok", zap.String("campaign-pd-leader-name", s.Name()))

alllocator, err := s.tsoAllocatorManager.GetAllocator(tso.GlobalDCLocation)
allocator, err := s.tsoAllocatorManager.GetAllocator(tso.GlobalDCLocation)
if err != nil {
log.Error("failed to get the global TSO allocator", errs.ZapError(err))
return
}
log.Info("initializing the global TSO allocator")
if err := alllocator.Initialize(0); err != nil {
if err := allocator.Initialize(0); err != nil {
log.Error("failed to initialize the global TSO allocator", errs.ZapError(err))
return
}
defer func() {
s.tsoAllocatorManager.ResetAllocatorGroup(tso.GlobalDCLocation)
failpoint.Inject("updateAfterResetTSO", func() {
if err = alllocator.UpdateTSO(); err != nil {
if err = allocator.UpdateTSO(); err != nil {
panic(err)
}
})
Expand Down
4 changes: 2 additions & 2 deletions server/storage/hot_region_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ func NewHotRegionsStorage(
if err != nil {
return nil, err
}
hotRegionInfoCtx, hotRegionInfoCancle := context.WithCancel(ctx)
hotRegionInfoCtx, hotRegionInfoCancel := context.WithCancel(ctx)
h := HotRegionStorage{
LevelDBKV: levelDB,
ekm: ekm,
batchHotInfo: make(map[string]*HistoryHotRegion),
hotRegionInfoCtx: hotRegionInfoCtx,
hotRegionInfoCancel: hotRegionInfoCancle,
hotRegionInfoCancel: hotRegionInfoCancel,
hotRegionStorageHandler: hotRegionStorageHandler,
curReservedDays: hotRegionStorageHandler.GetHotRegionsReservedDays(),
curInterval: hotRegionStorageHandler.GetHotRegionsWriteInterval(),
Expand Down
2 changes: 1 addition & 1 deletion server/storage/hot_region_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func newTestHotRegionStorage(pullInterval time.Duration,
}
packHotRegionInfo.pullInterval = pullInterval
packHotRegionInfo.reservedDays = reservedDays
// delete data in between today and tomrrow
// delete data in between today and tomorrow
hotRegionStorage, err = NewHotRegionsStorage(ctx,
writePath, nil, packHotRegionInfo)
if err != nil {
Expand Down

0 comments on commit ee302fc

Please sign in to comment.