From 7e946d4313f77882ced443670eee9cb24f1f30fc Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Mon, 20 Feb 2023 22:51:00 +0100 Subject: [PATCH] Add spaceIsDeleted checks --- commonspace/headsync/headsync.go | 42 ++++-- commonspace/objectsync/objectsync.go | 24 ++-- commonspace/settings/deletionmanager.go | 12 +- commonspace/settings/settings.go | 3 +- commonspace/space.go | 6 + commonspace/spaceservice.go | 10 +- commonspace/spacesyncproto/errors.go | 1 + .../spacesyncproto/protos/spacesync.proto | 1 + commonspace/spacesyncproto/spacesync.pb.go | 132 +++++++++--------- 9 files changed, 137 insertions(+), 94 deletions(-) diff --git a/commonspace/headsync/headsync.go b/commonspace/headsync/headsync.go index 0f61f315..dd920364 100644 --- a/commonspace/headsync/headsync.go +++ b/commonspace/headsync/headsync.go @@ -14,6 +14,7 @@ import ( "github.com/anytypeio/any-sync/util/periodicsync" "go.uber.org/zap" "strings" + "sync/atomic" "time" ) @@ -35,18 +36,20 @@ type HeadSync interface { } type headSync struct { - spaceId string - periodicSync periodicsync.PeriodicSync - storage spacestorage.SpaceStorage - diff ldiff.Diff - log logger.CtxLogger - syncer DiffSyncer + spaceId string + periodicSync periodicsync.PeriodicSync + storage spacestorage.SpaceStorage + diff ldiff.Diff + log logger.CtxLogger + syncer DiffSyncer + spaceIsDeleted *atomic.Bool syncPeriod int } func NewHeadSync( spaceId string, + spaceIsDeleted *atomic.Bool, syncPeriod int, storage spacestorage.SpaceStorage, peerManager peermanager.PeerManager, @@ -58,16 +61,23 @@ func NewHeadSync( l := log.With(zap.String("spaceId", spaceId)) factory := spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceSyncClient) syncer := newDiffSyncer(spaceId, diff, peerManager, cache, storage, factory, syncStatus, l) - periodicSync := periodicsync.NewPeriodicSync(syncPeriod, time.Minute, syncer.Sync, l) + sync := func(ctx context.Context) (err error) { + if spaceIsDeleted.Load() { + return spacesyncproto.ErrSpaceIsDeleted + } + return syncer.Sync(ctx) + } + periodicSync := periodicsync.NewPeriodicSync(syncPeriod, time.Minute, sync, l) return &headSync{ - spaceId: spaceId, - storage: storage, - syncer: syncer, - periodicSync: periodicSync, - diff: diff, - log: log, - syncPeriod: syncPeriod, + spaceId: spaceId, + storage: storage, + syncer: syncer, + periodicSync: periodicSync, + diff: diff, + log: log, + syncPeriod: syncPeriod, + spaceIsDeleted: spaceIsDeleted, } } @@ -78,6 +88,10 @@ func (d *headSync) Init(objectIds []string, deletionState deletionstate.Deletion } func (d *headSync) HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error) { + if d.spaceIsDeleted.Load() { + err = spacesyncproto.ErrSpaceIsDeleted + return + } return HandleRangeRequest(ctx, d.diff, req) } diff --git a/commonspace/objectsync/objectsync.go b/commonspace/objectsync/objectsync.go index 5184f797..04ff453d 100644 --- a/commonspace/objectsync/objectsync.go +++ b/commonspace/objectsync/objectsync.go @@ -9,6 +9,7 @@ import ( "github.com/anytypeio/any-sync/commonspace/peermanager" "github.com/anytypeio/any-sync/commonspace/spacesyncproto" "go.uber.org/zap" + "sync/atomic" "time" ) @@ -29,17 +30,20 @@ type objectSync struct { messagePool MessagePool objectGetter syncobjectgetter.SyncObjectGetter - syncCtx context.Context - cancelSync context.CancelFunc + syncCtx context.Context + cancelSync context.CancelFunc + spaceIsDeleted *atomic.Bool } func NewObjectSync( spaceId string, + spaceIsDeleted *atomic.Bool, peerManager peermanager.PeerManager, objectGetter syncobjectgetter.SyncObjectGetter) ObjectSync { syncCtx, cancel := context.WithCancel(context.Background()) os := newObjectSync( spaceId, + spaceIsDeleted, objectGetter, syncCtx, cancel) @@ -50,25 +54,24 @@ func NewObjectSync( func newObjectSync( spaceId string, + spaceIsDeleted *atomic.Bool, objectGetter syncobjectgetter.SyncObjectGetter, syncCtx context.Context, cancel context.CancelFunc, ) *objectSync { return &objectSync{ - objectGetter: objectGetter, - spaceId: spaceId, - syncCtx: syncCtx, - cancelSync: cancel, - //actionQueue: NewDefaultActionQueue(), + objectGetter: objectGetter, + spaceId: spaceId, + syncCtx: syncCtx, + cancelSync: cancel, + spaceIsDeleted: spaceIsDeleted, } } func (s *objectSync) Init() { - //s.actionQueue.Run() } func (s *objectSync) Close() (err error) { - //s.actionQueue.Close() s.cancelSync() return } @@ -82,6 +85,9 @@ func (s *objectSync) HandleMessage(ctx context.Context, senderId string, message } func (s *objectSync) handleMessage(ctx context.Context, senderId string, msg *spacesyncproto.ObjectSyncMessage) (err error) { + if s.spaceIsDeleted.Load() { + return spacesyncproto.ErrSpaceIsDeleted + } log.With(zap.String("objectId", msg.ObjectId), zap.String("replyId", msg.ReplyId)).DebugCtx(ctx, "handling message") obj, err := s.objectGetter.GetObject(ctx, msg.ObjectId) if err != nil { diff --git a/commonspace/settings/deletionmanager.go b/commonspace/settings/deletionmanager.go index d96d8321..a864bfef 100644 --- a/commonspace/settings/deletionmanager.go +++ b/commonspace/settings/deletionmanager.go @@ -20,14 +20,16 @@ type DeletionManager interface { func newDeletionManager( spaceId string, + deletionInterval time.Duration, deletionState deletionstate.DeletionState, provider SpaceIdsProvider, - deletionInterval time.Duration) DeletionManager { + onSpaceDelete func()) DeletionManager { return &deletionManager{ spaceId: spaceId, deletionState: deletionState, provider: provider, deletionInterval: deletionInterval, + onSpaceDelete: onSpaceDelete, } } @@ -37,6 +39,7 @@ type deletionManager struct { treeGetter treegetter.TreeGetter deletionInterval time.Duration spaceId string + onSpaceDelete func() } func (d *deletionManager) UpdateState(state *State) (err error) { @@ -44,12 +47,15 @@ func (d *deletionManager) UpdateState(state *State) (err error) { if err != nil { log.Warn("failed to add deleted ids to deletion state") } - if !state.SpaceDeletionDate.IsZero() && state.SpaceDeletionDate.Add(d.deletionInterval).Before(time.Now()) { - err = d.deletionState.Add(d.provider.AllIds()) + if !state.SpaceDeletionDate.IsZero() { spaceDeleter, ok := d.treeGetter.(SpaceDeleter) if ok { spaceDeleter.DeleteSpace(d.spaceId) } + if state.SpaceDeletionDate.Add(d.deletionInterval).Before(time.Now()) { + err = d.deletionState.Add(d.provider.AllIds()) + d.onSpaceDelete() + } } return } diff --git a/commonspace/settings/settings.go b/commonspace/settings/settings.go index b32cfd7e..a252901d 100644 --- a/commonspace/settings/settings.go +++ b/commonspace/settings/settings.go @@ -41,6 +41,7 @@ type Deps struct { Store spacestorage.SpaceStorage DeletionState deletionstate.DeletionState Provider SpaceIdsProvider + OnSpaceDelete func() // testing dependencies builder StateBuilder del Deleter @@ -73,7 +74,7 @@ func NewSettingsObject(deps Deps, spaceId string) (obj SettingsObject) { deleter = deps.del } if deps.delManager == nil { - deletionManager = newDeletionManager(spaceId, deps.DeletionState, deps.Provider, spaceDeletionInterval) + deletionManager = newDeletionManager(spaceId, spaceDeletionInterval, deps.DeletionState, deps.Provider, deps.OnSpaceDelete) } else { deletionManager = deps.delManager } diff --git a/commonspace/space.go b/commonspace/space.go index 330f85a2..2e9f30d6 100644 --- a/commonspace/space.go +++ b/commonspace/space.go @@ -128,6 +128,7 @@ type space struct { handleQueue multiqueue.MultiQueue[HandleMessage] isClosed *atomic.Bool + isDeleted *atomic.Bool treesUsed *atomic.Int32 } @@ -209,6 +210,7 @@ func (s *space) Init(ctx context.Context) (err error) { Store: s.storage, DeletionState: deletionState, Provider: s.headSync, + OnSpaceDelete: s.onSpaceDelete, } s.settingsObject = settings.NewSettingsObject(deps, s.id) s.objectSync.Init() @@ -409,6 +411,10 @@ func (s *space) onObjectClose(id string) { _ = s.handleQueue.CloseThread(id) } +func (s *space) onSpaceDelete() { + s.isDeleted.Swap(true) +} + func (s *space) Close() error { if s.isClosed.Swap(true) { log.Warn("call space.Close on closed space", zap.String("id", s.id)) diff --git a/commonspace/spaceservice.go b/commonspace/spaceservice.go index 502ca9a8..d8f292aa 100644 --- a/commonspace/spaceservice.go +++ b/commonspace/spaceservice.go @@ -117,7 +117,10 @@ func (s *spaceService) NewSpace(ctx context.Context, id string) (Space, error) { } lastConfiguration := s.configurationService.GetLast() - var spaceIsClosed = &atomic.Bool{} + var ( + spaceIsClosed = &atomic.Bool{} + spaceIsDeleted = &atomic.Bool{} + ) getter := newCommonGetter(st.Id(), s.treeGetter, spaceIsClosed) syncStatus := syncstatus.NewNoOpSyncStatus() // this will work only for clients, not the best solution, but... @@ -131,8 +134,8 @@ func (s *spaceService) NewSpace(ctx context.Context, id string) (Space, error) { return nil, err } - headSync := headsync.NewHeadSync(id, s.config.SyncPeriod, st, peerManager, getter, syncStatus, log) - objectSync := objectsync.NewObjectSync(id, peerManager, getter) + headSync := headsync.NewHeadSync(id, spaceIsDeleted, s.config.SyncPeriod, st, peerManager, getter, syncStatus, log) + objectSync := objectsync.NewObjectSync(id, spaceIsDeleted, peerManager, getter) sp := &space{ id: id, objectSync: objectSync, @@ -145,6 +148,7 @@ func (s *spaceService) NewSpace(ctx context.Context, id string) (Space, error) { storage: st, treesUsed: &atomic.Int32{}, isClosed: spaceIsClosed, + isDeleted: spaceIsDeleted, } return sp, nil } diff --git a/commonspace/spacesyncproto/errors.go b/commonspace/spacesyncproto/errors.go index e08a4df6..56ac0446 100644 --- a/commonspace/spacesyncproto/errors.go +++ b/commonspace/spacesyncproto/errors.go @@ -12,4 +12,5 @@ var ( ErrSpaceMissing = errGroup.Register(errors.New("space is missing"), uint64(ErrCodes_SpaceMissing)) ErrSpaceExists = errGroup.Register(errors.New("space exists"), uint64(ErrCodes_SpaceExists)) ErrSpaceNotInCache = errGroup.Register(errors.New("space not in cache"), uint64(ErrCodes_SpaceNotInCache)) + ErrSpaceIsDeleted = errGroup.Register(errors.New("space is deleted"), uint64(ErrCodes_SpaceIsDeleted)) ) diff --git a/commonspace/spacesyncproto/protos/spacesync.proto b/commonspace/spacesyncproto/protos/spacesync.proto index 059eb7ba..7a0865bb 100644 --- a/commonspace/spacesyncproto/protos/spacesync.proto +++ b/commonspace/spacesyncproto/protos/spacesync.proto @@ -8,6 +8,7 @@ enum ErrCodes { SpaceMissing = 1; SpaceExists = 2; SpaceNotInCache = 3; + SpaceIsDeleted = 4; ErrorOffset = 100; } diff --git a/commonspace/spacesyncproto/spacesync.pb.go b/commonspace/spacesyncproto/spacesync.pb.go index 3f9aabc7..3fa19f6f 100644 --- a/commonspace/spacesyncproto/spacesync.pb.go +++ b/commonspace/spacesyncproto/spacesync.pb.go @@ -29,6 +29,7 @@ const ( ErrCodes_SpaceMissing ErrCodes = 1 ErrCodes_SpaceExists ErrCodes = 2 ErrCodes_SpaceNotInCache ErrCodes = 3 + ErrCodes_SpaceIsDeleted ErrCodes = 4 ErrCodes_ErrorOffset ErrCodes = 100 ) @@ -37,6 +38,7 @@ var ErrCodes_name = map[int32]string{ 1: "SpaceMissing", 2: "SpaceExists", 3: "SpaceNotInCache", + 4: "SpaceIsDeleted", 100: "ErrorOffset", } @@ -45,6 +47,7 @@ var ErrCodes_value = map[string]int32{ "SpaceMissing": 1, "SpaceExists": 2, "SpaceNotInCache": 3, + "SpaceIsDeleted": 4, "ErrorOffset": 100, } @@ -1229,70 +1232,71 @@ func init() { } var fileDescriptor_80e49f1f4ac27799 = []byte{ - // 1007 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xf7, 0x6e, 0x9e, 0xfe, 0xe2, 0x38, 0xdb, 0x69, 0xda, 0x1a, 0x37, 0x72, 0xad, 0x39, 0xa0, - 0xa8, 0x48, 0x7d, 0xa4, 0x08, 0xa9, 0x05, 0x0e, 0x6d, 0xe2, 0x52, 0x0b, 0x95, 0x44, 0xe3, 0x56, - 0x48, 0x48, 0x1c, 0x26, 0xbb, 0x13, 0x7b, 0x61, 0x3d, 0xb3, 0xec, 0x8c, 0x69, 0x7c, 0xe4, 0xc4, - 0x95, 0x33, 0x9c, 0xf8, 0x1f, 0xf8, 0x23, 0x38, 0xf6, 0xc8, 0x11, 0x25, 0xff, 0x08, 0x9a, 0xd9, - 0xd9, 0x97, 0xbd, 0xee, 0x81, 0x8b, 0xb3, 0xdf, 0xeb, 0xf7, 0x3d, 0xe7, 0xfb, 0x02, 0x8f, 0x7d, - 0x31, 0x9d, 0x0a, 0x2e, 0x63, 0xea, 0xb3, 0x87, 0xe6, 0x57, 0xce, 0xb9, 0x1f, 0x27, 0x42, 0x89, - 0x87, 0xe6, 0x57, 0x16, 0xdc, 0x07, 0x86, 0x81, 0x9a, 0x39, 0x03, 0x0f, 0x61, 0xf7, 0x15, 0xa3, - 0xc1, 0x68, 0xce, 0x7d, 0x42, 0xf9, 0x98, 0x21, 0x04, 0xeb, 0x17, 0x89, 0x98, 0x76, 0x9c, 0xbe, - 0x73, 0xb8, 0x4e, 0xcc, 0x37, 0x6a, 0x83, 0xab, 0x44, 0xc7, 0x35, 0x1c, 0x57, 0x09, 0xb4, 0x0f, - 0x1b, 0x51, 0x38, 0x0d, 0x55, 0x67, 0xad, 0xef, 0x1c, 0xee, 0x92, 0x94, 0xc0, 0x97, 0xd0, 0xce, - 0xa1, 0x98, 0x9c, 0x45, 0x4a, 0x63, 0x4d, 0xa8, 0x9c, 0x18, 0xac, 0x16, 0x31, 0xdf, 0xe8, 0x0b, - 0xd8, 0x66, 0x11, 0x9b, 0x32, 0xae, 0x64, 0xc7, 0xed, 0xaf, 0x1d, 0xee, 0x1c, 0xf5, 0x1f, 0x14, - 0xf1, 0x55, 0x01, 0x06, 0xa9, 0x22, 0xc9, 0x2d, 0xb4, 0x67, 0x5f, 0xcc, 0x78, 0xee, 0xd9, 0x10, - 0xf8, 0x73, 0xb8, 0x55, 0x6b, 0xa8, 0x03, 0x0f, 0x03, 0xe3, 0xbe, 0x49, 0xdc, 0x30, 0x30, 0x01, - 0x31, 0x1a, 0x98, 0x54, 0x9a, 0xc4, 0x7c, 0xe3, 0xef, 0x61, 0xaf, 0x30, 0xfe, 0x69, 0xc6, 0xa4, - 0x42, 0x1d, 0xd8, 0x32, 0x21, 0x0d, 0x33, 0xdb, 0x8c, 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, 0xce, 0x37, 0xcd, 0x9f, - 0x27, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x33, 0x0a, 0x59, 0xe5, 0xf5, 0x09, 0x00, 0x00, + // 1021 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x6e, 0xdc, 0x24, 0x7e, 0x71, 0x9c, 0xed, 0x34, 0x6d, 0x8d, 0x1b, 0xb9, 0xd6, 0x1c, + 0x50, 0x54, 0xa4, 0x7e, 0xb8, 0x08, 0xa9, 0x05, 0x0e, 0x6d, 0xe2, 0x52, 0x0b, 0x95, 0x44, 0xe3, + 0x56, 0x48, 0x48, 0x1c, 0x26, 0xbb, 0x13, 0x7b, 0x61, 0x3d, 0xb3, 0xec, 0x8c, 0x49, 0x7c, 0xe4, + 0xc4, 0x95, 0x33, 0x9c, 0xf8, 0x1f, 0xf8, 0x23, 0x38, 0xf6, 0xc8, 0x11, 0x25, 0xff, 0x08, 0x9a, + 0xd9, 0xd9, 0x0f, 0xdb, 0xeb, 0x1e, 0xb8, 0x38, 0x3b, 0xef, 0xe3, 0xf7, 0x3e, 0x7e, 0x33, 0xef, + 0x05, 0x9e, 0xf8, 0x62, 0x3a, 0x15, 0x5c, 0xc6, 0xd4, 0x67, 0x8f, 0xcc, 0xaf, 0x9c, 0x73, 0x3f, + 0x4e, 0x84, 0x12, 0x8f, 0xcc, 0xaf, 0x2c, 0xa4, 0x0f, 0x8d, 0x00, 0x35, 0x72, 0x01, 0x1e, 0xc2, + 0xee, 0x6b, 0x46, 0x83, 0xd1, 0x9c, 0xfb, 0x84, 0xf2, 0x31, 0x43, 0x08, 0xea, 0xe7, 0x89, 0x98, + 0xb6, 0x9d, 0x9e, 0x73, 0x58, 0x27, 0xe6, 0x1b, 0xb5, 0xc0, 0x55, 0xa2, 0xed, 0x1a, 0x89, 0x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 0x6a, 0xda, 0xf5, 0x1d, 0x97, 0xb9, 0xc0, 0xe9, 0xff, 0xe5, + 0x42, 0x23, 0xf5, 0x9d, 0x73, 0x1f, 0x1d, 0xc1, 0x76, 0xb6, 0xd4, 0x50, 0xa7, 0x72, 0xd3, 0x99, + 0x99, 0xde, 0xb9, 0x57, 0xbd, 0x05, 0xd3, 0x59, 0xfe, 0xca, 0x22, 0xea, 0xcd, 0x80, 0xee, 0xad, + 0xcc, 0xf1, 0x62, 0xed, 0x74, 0x0e, 0xaa, 0x95, 0x2b, 0x38, 0x51, 0x54, 0x85, 0x93, 0xaf, 0x98, + 0x2a, 0x9c, 0xd2, 0x6e, 0x21, 0xe0, 0x15, 0xdb, 0x78, 0xa4, 0x12, 0x46, 0xa7, 0xe8, 0x60, 0xe5, + 0x35, 0x97, 0x56, 0x75, 0xe7, 0x83, 0xda, 0x43, 0xe7, 0xb1, 0xf3, 0xf2, 0xd3, 0xbf, 0xaf, 0xba, + 0xce, 0xfb, 0xab, 0xae, 0xf3, 0xef, 0x55, 0xd7, 0xf9, 0xed, 0xba, 0x5b, 0x7b, 0x7f, 0xdd, 0xad, + 0xfd, 0x73, 0xdd, 0xad, 0x7d, 0xd7, 0x59, 0xff, 0x4f, 0xde, 0xd9, 0xa6, 0xf9, 0xf3, 0xf4, 0xbf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xd9, 0x0b, 0xc0, 0x09, 0x0a, 0x00, 0x00, } func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) {