mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-12 02:30:41 +09:00
Add increment/decrement logs
This commit is contained in:
parent
1fbf87995b
commit
6b2667d4dc
1 changed files with 2 additions and 2 deletions
|
@ -330,7 +330,7 @@ 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.String("spaceId", s.id))
|
||||
log.Debug("incrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()+1), zap.String("spaceId", s.id))
|
||||
s.treesUsed.Add(1)
|
||||
return
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ func (s *space) handleMessage(msg HandleMessage) {
|
|||
}
|
||||
|
||||
func (s *space) onObjectClose(id string) {
|
||||
log.Debug("decrementing counter", zap.String("id", id), zap.String("spaceId", s.id))
|
||||
log.Debug("decrementing counter", zap.String("id", id), zap.Int32("trees", s.treesUsed.Load()+1), zap.String("spaceId", s.id))
|
||||
s.treesUsed.Add(-1)
|
||||
_ = s.handleQueue.CloseThread(id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue