Update counters
This commit is contained in:
parent
6b2667d4dc
commit
a2efcafb3e
@ -330,8 +330,8 @@ func (s *space) BuildTree(ctx context.Context, id string, opts BuildTreeOpts) (t
|
||||
if t, err = synctree.BuildSyncTreeOrGetRemote(ctx, id, deps); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Debug("incrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()+1), zap.String("spaceId", s.id))
|
||||
s.treesUsed.Add(1)
|
||||
log.Debug("incrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()), zap.String("spaceId", s.id))
|
||||
return
|
||||
}
|
||||
|
||||
@ -406,8 +406,8 @@ func (s *space) handleMessage(msg HandleMessage) {
|
||||
}
|
||||
|
||||
func (s *space) onObjectClose(id string) {
|
||||
log.Debug("decrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()+1), zap.String("spaceId", s.id))
|
||||
s.treesUsed.Add(-1)
|
||||
log.Debug("decrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()), zap.String("spaceId", s.id))
|
||||
_ = s.handleQueue.CloseThread(id)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user