1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-09 09:35:03 +09:00

Add debug logs

This commit is contained in:
mcrakhman 2024-01-25 13:13:30 +01:00
parent 2cd07f3011
commit 1a8db0f59f
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -3,6 +3,9 @@ package syncacl
import (
"context"
"errors"
"go.uber.org/zap"
"github.com/anyproto/any-sync/commonspace/object/acl/syncacl/headupdater"
"github.com/anyproto/any-sync/commonspace/object/syncobjectgetter"
@ -119,6 +122,7 @@ func (s *syncAcl) AddRawRecords(rawRecords []*consensusproto.RawRecordWithId) (e
if err != nil {
return
}
log.Debug("records updated, final state", zap.String("head", s.AclList.Head().Id), zap.Int("len(total)", len(s.AclList.Records())))
headUpdate := s.syncClient.CreateHeadUpdate(s, rawRecords)
s.headUpdater.UpdateHeads(s.Id(), []string{rawRecords[len(rawRecords)-1].Id})
s.syncClient.Broadcast(headUpdate)