Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Dec 4, 2024
1 parent 200321d commit e5053da
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/schedule/operator/operator_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (c *opCounter) inc(kind OpKind, op *Operator) {
defer c.Unlock()
c.count[kind]++
c.mergeMap[op.RegionID()] = op.String()
log.Info("merge checker opCounter",
log.Info("merge checker opCounter inc",
zap.String("kind", kind.String()),
zap.Uint64("op", op.RegionID()),
zap.String("op", op.String()),
Expand All @@ -77,8 +77,16 @@ func (c *opCounter) dec(kind OpKind, op *Operator) {
if c.count[kind] > 0 {
c.count[kind]--
}
if _, ok := c.mergeMap[op.RegionID()]; !ok {
log.Info("merge checker opCounter not exist",
zap.String("kind", kind.String()),
zap.Uint64("op", op.RegionID()),
zap.String("op", op.String()),
zap.Int("count", int(c.count[kind])))
return
}
delete(c.mergeMap, op.RegionID())
log.Info("merge checker opCounter",
log.Info("merge checker opCounter dec",
zap.String("kind", kind.String()),
zap.Uint64("op", op.RegionID()),
zap.String("op", op.String()),
Expand Down

0 comments on commit e5053da

Please sign in to comment.