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

Remove old inmemory list storage

This commit is contained in:
mcrakhman 2024-12-02 21:23:40 +01:00
parent d8edabf9cd
commit cef4f8e5b4
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
4 changed files with 8 additions and 11 deletions

View file

@ -6,11 +6,11 @@ import (
"sync"
"time"
"github.com/anyproto/any-sync/commonspace/object/acl/list"
"github.com/anyproto/any-sync/commonspace/object/acl/liststorage"
"github.com/anyproto/any-sync/consensus/consensusproto"
"go.uber.org/atomic"
"go.uber.org/zap"
"github.com/anyproto/any-sync/commonspace/object/acl/list"
"github.com/anyproto/any-sync/consensus/consensusproto"
)
func (as *aclService) newAclObject(ctx context.Context, id string) (*aclObject, error) {
@ -38,7 +38,7 @@ func (as *aclService) newAclObject(ctx context.Context, id string) (*aclObject,
type aclObject struct {
id string
aclService *aclService
store liststorage.ListStorage
store list.Storage
list.AclList
ready chan struct{}
@ -55,7 +55,7 @@ func (a *aclObject) AddConsensusRecords(recs []*consensusproto.RawRecordWithId)
slices.Reverse(recs)
if a.store == nil {
defer close(a.ready)
if a.store, a.consErr = liststorage.NewInMemoryAclListStorage(a.id, recs); a.consErr != nil {
if a.store, a.consErr = list.NewInMemoryStorage(a.id, recs); a.consErr != nil {
return
}
if a.AclList, a.consErr = list.BuildAclListWithIdentity(a.aclService.accountService.Account(), a.store, list.NoOpAcceptorVerifier{}); a.consErr != nil {