Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed May 15, 2019
1 parent 2fc74f0 commit a0c116c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/schedule/operator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,19 @@ func (oc *OperatorController) pollNeedDispatchRegion() (r *core.RegionInfo, next
regionID := item.op.regionID
op, ok := oc.operators[regionID]
if !ok || op == nil {
log.Info("Debug pop region",zap.Uint64("region-id",regionID))
oc.opNotifierQueue.Pop()
log.Info("Debug pop region", zap.Uint64("region-id", regionID))
heap.Pop(&oc.opNotifierQueue)
return nil, true
}
r = oc.cluster.GetRegion(regionID)
if r == nil {
log.Info("Debug pop region",zap.Uint64("region-id",regionID))
log.Info("Debug pop region", zap.Uint64("region-id", regionID))
heap.Pop(&oc.opNotifierQueue)
return nil, true
}
step := op.Check(r)
if step == nil {
log.Info("Debug pop region",zap.Uint64("region-id",regionID))
log.Info("Debug pop region", zap.Uint64("region-id", regionID))
heap.Pop(&oc.opNotifierQueue)
return nil, true
}
Expand Down Expand Up @@ -219,7 +219,7 @@ func (oc *OperatorController) addOperatorLocked(op *Operator) bool {
}
}

heap.Push(&oc.opNotifierQueue, &operatorWithTime{op: op, time: oc.getNextPushOperatorTime(step,time.Now())})
heap.Push(&oc.opNotifierQueue, &operatorWithTime{op: op, time: oc.getNextPushOperatorTime(step, time.Now())})
log.Info("Push the operator the heap", zap.Reflect("heap", op))
operatorCounter.WithLabelValues(op.Desc(), "create").Inc()
return true
Expand Down

0 comments on commit a0c116c

Please sign in to comment.