mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Derived fixes
This commit is contained in:
parent
1e87107991
commit
fdae244b64
2 changed files with 5 additions and 1 deletions
|
@ -145,6 +145,9 @@ func (h *headSync) Close(ctx context.Context) (err error) {
|
|||
func (h *headSync) fillDiff(ctx context.Context) error {
|
||||
var els = make([]ldiff.Element, 0, 100)
|
||||
err := h.storage.HeadStorage().IterateEntries(ctx, headstorage.IterOpts{}, func(entry headstorage.HeadsEntry) (bool, error) {
|
||||
if entry.IsDerived && entry.Heads[0] == entry.Id {
|
||||
return true, nil
|
||||
}
|
||||
els = append(els, ldiff.Element{
|
||||
Id: entry.Id,
|
||||
Head: concatStrings(entry.Heads),
|
||||
|
|
|
@ -15,7 +15,8 @@ type headUpdater struct {
|
|||
|
||||
func newHeadUpdater(update func(update headstorage.HeadsUpdate)) *headUpdater {
|
||||
return &headUpdater{
|
||||
batcher: mb.New[headstorage.HeadsUpdate](0),
|
||||
batcher: mb.New[headstorage.HeadsUpdate](0),
|
||||
updateFunc: update,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue