Add some deletion logic

This commit is contained in:
mcrakhman 2023-02-20 21:43:14 +01:00 committed by Mikhail Iudin
parent 04512cee0d
commit 09387888de
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
7 changed files with 545 additions and 98 deletions

View File

@ -0,0 +1,55 @@
package settings
import (
"github.com/anytypeio/any-sync/commonspace/object/treegetter"
"github.com/anytypeio/any-sync/commonspace/settings/deletionstate"
"time"
)
type SpaceIdsProvider interface {
AllIds() []string
}
type SpaceDeleter interface {
DeleteSpace(spaceId string)
}
type DeletionManager interface {
UpdateState(state *State) (err error)
}
func newDeletionManager(
spaceId string,
deletionState deletionstate.DeletionState,
provider SpaceIdsProvider,
deletionInterval time.Duration) DeletionManager {
return &deletionManager{
spaceId: spaceId,
deletionState: deletionState,
provider: provider,
deletionInterval: deletionInterval,
}
}
type deletionManager struct {
deletionState deletionstate.DeletionState
provider SpaceIdsProvider
treeGetter treegetter.TreeGetter
deletionInterval time.Duration
spaceId string
}
func (d *deletionManager) UpdateState(state *State) (err error) {
err = d.deletionState.Add(state.DeletedIds)
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())
spaceDeleter, ok := d.treeGetter.(SpaceDeleter)
if ok {
spaceDeleter.DeleteSpace(d.spaceId)
}
}
return
}

View File

@ -13,10 +13,13 @@ import (
"github.com/anytypeio/any-sync/commonspace/settings/deletionstate" "github.com/anytypeio/any-sync/commonspace/settings/deletionstate"
spacestorage "github.com/anytypeio/any-sync/commonspace/spacestorage" spacestorage "github.com/anytypeio/any-sync/commonspace/spacestorage"
"go.uber.org/zap" "go.uber.org/zap"
"time"
) )
var log = logger.NewNamed("common.commonspace.settings") var log = logger.NewNamed("common.commonspace.settings")
const spaceDeletionInterval = time.Hour * 24 * 7
type SettingsObject interface { type SettingsObject interface {
synctree.SyncTree synctree.SyncTree
Init(ctx context.Context) (err error) Init(ctx context.Context) (err error)
@ -37,9 +40,11 @@ type Deps struct {
TreeGetter treegetter.TreeGetter TreeGetter treegetter.TreeGetter
Store spacestorage.SpaceStorage Store spacestorage.SpaceStorage
DeletionState deletionstate.DeletionState DeletionState deletionstate.DeletionState
Provider SpaceIdsProvider
// testing dependencies // testing dependencies
prov DeletedIdsProvider builder StateBuilder
del Deleter del Deleter
delManager DeletionManager
} }
type settingsObject struct { type settingsObject struct {
@ -48,21 +53,35 @@ type settingsObject struct {
spaceId string spaceId string
treeGetter treegetter.TreeGetter treeGetter treegetter.TreeGetter
store spacestorage.SpaceStorage store spacestorage.SpaceStorage
prov DeletedIdsProvider builder StateBuilder
buildFunc BuildTreeFunc buildFunc BuildTreeFunc
loop *deleteLoop loop *deleteLoop
deletionState deletionstate.DeletionState deletionState deletionstate.DeletionState
lastChangeId string deletionManager DeletionManager
} }
func NewSettingsObject(deps Deps, spaceId string) (obj SettingsObject) { func NewSettingsObject(deps Deps, spaceId string) (obj SettingsObject) {
var deleter Deleter var (
deleter Deleter
deletionManager DeletionManager
builder StateBuilder
)
if deps.del == nil { if deps.del == nil {
deleter = newDeleter(deps.Store, deps.DeletionState, deps.TreeGetter) deleter = newDeleter(deps.Store, deps.DeletionState, deps.TreeGetter)
} else { } else {
deleter = deps.del deleter = deps.del
} }
if deps.delManager == nil {
deletionManager = newDeletionManager(spaceId, deps.DeletionState, deps.Provider, spaceDeletionInterval)
} else {
deletionManager = deps.delManager
}
if deps.builder == nil {
builder = newStateBuilder()
} else {
builder = deps.builder
}
loop := newDeleteLoop(func() { loop := newDeleteLoop(func() {
deleter.Delete() deleter.Delete()
@ -72,48 +91,40 @@ func NewSettingsObject(deps Deps, spaceId string) (obj SettingsObject) {
}) })
s := &settingsObject{ s := &settingsObject{
loop: loop, loop: loop,
spaceId: spaceId, spaceId: spaceId,
account: deps.Account, account: deps.Account,
deletionState: deps.DeletionState, deletionState: deps.DeletionState,
treeGetter: deps.TreeGetter, treeGetter: deps.TreeGetter,
store: deps.Store, store: deps.Store,
buildFunc: deps.BuildFunc, buildFunc: deps.BuildFunc,
builder: builder,
deletionManager: deletionManager,
} }
// this is needed mainly for testing
if deps.prov == nil {
s.prov = &provider{}
} else {
s.prov = deps.prov
}
obj = s obj = s
return return
} }
func (s *settingsObject) updateIds(tr objecttree.ObjectTree, lastChangeId string) { func (s *settingsObject) updateIds(tr objecttree.ObjectTree, isUpdate bool) {
s.lastChangeId = lastChangeId state, err := s.builder.Build(tr, isUpdate)
ids, lastId, err := s.prov.ProvideIds(tr, s.lastChangeId)
if err != nil { if err != nil {
log.With(zap.Strings("ids", ids), zap.Error(err)).Error("failed to update state") log.Error("failed to build state", zap.Error(err))
return return
} }
s.lastChangeId = lastId if err = s.deletionManager.UpdateState(state); err != nil {
if err = s.deletionState.Add(ids); err != nil { log.Error("failed to update state", zap.Error(err))
log.With(zap.Strings("ids", ids), zap.Error(err)).Error("failed to queue ids to delete")
} }
} }
// Update is called as part of UpdateListener interface // Update is called as part of UpdateListener interface
func (s *settingsObject) Update(tr objecttree.ObjectTree) { func (s *settingsObject) Update(tr objecttree.ObjectTree) {
s.updateIds(tr, s.lastChangeId) s.updateIds(tr, true)
} }
// Rebuild is called as part of UpdateListener interface (including when the object is built for the first time, e.g. on Init call) // Rebuild is called as part of UpdateListener interface (including when the object is built for the first time, e.g. on Init call)
func (s *settingsObject) Rebuild(tr objecttree.ObjectTree) { func (s *settingsObject) Rebuild(tr objecttree.ObjectTree) {
// at initial build "s" may not contain the object tree, so it is safer to provide it from the function parameter // at initial build "s" may not contain the object tree, so it is safer to provide it from the function parameter
s.updateIds(tr, "") s.updateIds(tr, false)
} }
func (s *settingsObject) Init(ctx context.Context) (err error) { func (s *settingsObject) Init(ctx context.Context) (err error) {
@ -133,6 +144,14 @@ func (s *settingsObject) Close() error {
return s.SyncTree.Close() return s.SyncTree.Close()
} }
func (s *settingsObject) DeleteAccount() (err error) {
return nil
}
func (s *settingsObject) RestoreAccount() (err error) {
return nil
}
func (s *settingsObject) DeleteObject(id string) (err error) { func (s *settingsObject) DeleteObject(id string) (err error) {
s.Lock() s.Lock()
defer s.Unlock() defer s.Unlock()

View File

@ -0,0 +1,9 @@
package settings
import "time"
type State struct {
DeletedIds []string
SpaceDeletionDate time.Time
LastIteratedId string
}

View File

@ -0,0 +1,85 @@
package settings
import (
"github.com/anytypeio/any-sync/commonspace/object/tree/objecttree"
"github.com/anytypeio/any-sync/commonspace/spacesyncproto"
"github.com/gogo/protobuf/proto"
"time"
)
type StateBuilder interface {
Build(tree objecttree.ObjectTree, isUpdate bool) (*State, error)
}
func newStateBuilder() StateBuilder {
return &stateBuilder{}
}
type stateBuilder struct {
state *State
}
func (s *stateBuilder) Build(tr objecttree.ObjectTree, isUpdate bool) (state *State, err error) {
state = s.state
defer func() {
if err == nil {
s.state = state
}
}()
if !isUpdate || state == nil {
state = &State{}
}
var (
rootId = tr.Root().Id
startId = state.LastIteratedId
)
process := func(change *objecttree.Change) bool {
state.LastIteratedId = change.Id
state = s.processChange(change, rootId, startId, state)
return true
}
convert := func(decrypted []byte) (res any, err error) {
deleteChange := &spacesyncproto.SettingsData{}
err = proto.Unmarshal(decrypted, deleteChange)
if err != nil {
return nil, err
}
return deleteChange, nil
}
if startId == "" {
startId = rootId
}
err = tr.IterateFrom(state.LastIteratedId, convert, process)
return
}
func (s *stateBuilder) processChange(change *objecttree.Change, rootId, startId string, state *State) *State {
// ignoring root change which has empty model or startId change
if change.Model == nil || (change.Id == startId && startId != "") {
return state
}
deleteChange := change.Model.(*spacesyncproto.SettingsData)
// getting data from snapshot if we start from it
if change.Id == rootId {
state = &State{
DeletedIds: deleteChange.Snapshot.DeletedIds,
SpaceDeletionDate: time.Unix(0, deleteChange.Snapshot.SpaceDeletionTimestamp),
LastIteratedId: rootId,
}
return state
}
// otherwise getting data from content
for _, cnt := range deleteChange.Content {
switch {
case cnt.GetObjectDelete() != nil:
state.DeletedIds = append(state.DeletedIds, cnt.GetObjectDelete().GetId())
case cnt.GetSpaceDelete() != nil:
state.SpaceDeletionDate = time.Unix(0, cnt.GetSpaceDelete().GetTimestamp())
}
}
return state
}

View File

@ -208,6 +208,7 @@ func (s *space) Init(ctx context.Context) (err error) {
TreeGetter: s.cache, TreeGetter: s.cache,
Store: s.storage, Store: s.storage,
DeletionState: deletionState, DeletionState: deletionState,
Provider: s.headSync,
} }
s.settingsObject = settings.NewSettingsObject(deps, s.id) s.settingsObject = settings.NewSettingsObject(deps, s.id)
s.objectSync.Init() s.objectSync.Init()

View File

@ -60,8 +60,6 @@ message ObjectSyncMessage {
string replyId = 3; string replyId = 3;
bytes payload = 4; bytes payload = 4;
string objectId = 5; string objectId = 5;
// string identity = 5;
// string peerSignature = 6;
} }
// SpacePushRequest is a request to add space on a node containing only one acl record // SpacePushRequest is a request to add space on a node containing only one acl record
@ -116,6 +114,7 @@ message RawSpaceHeaderWithId {
message SpaceSettingsContent { message SpaceSettingsContent {
oneof value { oneof value {
ObjectDelete objectDelete = 1; ObjectDelete objectDelete = 1;
SpaceDelete spaceDelete = 2;
} }
} }
@ -124,9 +123,15 @@ message ObjectDelete {
string id = 1; string id = 1;
} }
// SpaceDelete is a message containing timestamp when space was deleted
message SpaceDelete {
int64 timestamp = 1;
}
// SpaceSettingsSnapshot contains all the deleted ids in a snapshot // SpaceSettingsSnapshot contains all the deleted ids in a snapshot
message SpaceSettingsSnapshot { message SpaceSettingsSnapshot {
repeated string deletedIds = 1; repeated string deletedIds = 1;
int64 spaceDeletionTimestamp = 2;
} }
// SettingsData contains ObjectTree change payload // SettingsData contains ObjectTree change payload

View File

@ -869,6 +869,7 @@ type SpaceSettingsContent struct {
// Types that are valid to be assigned to Value: // Types that are valid to be assigned to Value:
// //
// *SpaceSettingsContent_ObjectDelete // *SpaceSettingsContent_ObjectDelete
// *SpaceSettingsContent_SpaceDelete
Value isSpaceSettingsContent_Value `protobuf_oneof:"value"` Value isSpaceSettingsContent_Value `protobuf_oneof:"value"`
} }
@ -914,8 +915,12 @@ type isSpaceSettingsContent_Value interface {
type SpaceSettingsContent_ObjectDelete struct { type SpaceSettingsContent_ObjectDelete struct {
ObjectDelete *ObjectDelete `protobuf:"bytes,1,opt,name=objectDelete,proto3,oneof" json:"objectDelete,omitempty"` ObjectDelete *ObjectDelete `protobuf:"bytes,1,opt,name=objectDelete,proto3,oneof" json:"objectDelete,omitempty"`
} }
type SpaceSettingsContent_SpaceDelete struct {
SpaceDelete *SpaceDelete `protobuf:"bytes,2,opt,name=spaceDelete,proto3,oneof" json:"spaceDelete,omitempty"`
}
func (*SpaceSettingsContent_ObjectDelete) isSpaceSettingsContent_Value() {} func (*SpaceSettingsContent_ObjectDelete) isSpaceSettingsContent_Value() {}
func (*SpaceSettingsContent_SpaceDelete) isSpaceSettingsContent_Value() {}
func (m *SpaceSettingsContent) GetValue() isSpaceSettingsContent_Value { func (m *SpaceSettingsContent) GetValue() isSpaceSettingsContent_Value {
if m != nil { if m != nil {
@ -931,10 +936,18 @@ func (m *SpaceSettingsContent) GetObjectDelete() *ObjectDelete {
return nil return nil
} }
func (m *SpaceSettingsContent) GetSpaceDelete() *SpaceDelete {
if x, ok := m.GetValue().(*SpaceSettingsContent_SpaceDelete); ok {
return x.SpaceDelete
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package. // XXX_OneofWrappers is for the internal use of the proto package.
func (*SpaceSettingsContent) XXX_OneofWrappers() []interface{} { func (*SpaceSettingsContent) XXX_OneofWrappers() []interface{} {
return []interface{}{ return []interface{}{
(*SpaceSettingsContent_ObjectDelete)(nil), (*SpaceSettingsContent_ObjectDelete)(nil),
(*SpaceSettingsContent_SpaceDelete)(nil),
} }
} }
@ -983,16 +996,62 @@ func (m *ObjectDelete) GetId() string {
return "" return ""
} }
// SpaceDelete is a message containing timestamp when space was deleted
type SpaceDelete struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}
func (m *SpaceDelete) Reset() { *m = SpaceDelete{} }
func (m *SpaceDelete) String() string { return proto.CompactTextString(m) }
func (*SpaceDelete) ProtoMessage() {}
func (*SpaceDelete) Descriptor() ([]byte, []int) {
return fileDescriptor_80e49f1f4ac27799, []int{16}
}
func (m *SpaceDelete) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *SpaceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_SpaceDelete.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *SpaceDelete) XXX_Merge(src proto.Message) {
xxx_messageInfo_SpaceDelete.Merge(m, src)
}
func (m *SpaceDelete) XXX_Size() int {
return m.Size()
}
func (m *SpaceDelete) XXX_DiscardUnknown() {
xxx_messageInfo_SpaceDelete.DiscardUnknown(m)
}
var xxx_messageInfo_SpaceDelete proto.InternalMessageInfo
func (m *SpaceDelete) GetTimestamp() int64 {
if m != nil {
return m.Timestamp
}
return 0
}
// SpaceSettingsSnapshot contains all the deleted ids in a snapshot // SpaceSettingsSnapshot contains all the deleted ids in a snapshot
type SpaceSettingsSnapshot struct { type SpaceSettingsSnapshot struct {
DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"` DeletedIds []string `protobuf:"bytes,1,rep,name=deletedIds,proto3" json:"deletedIds,omitempty"`
SpaceDeletionTimestamp int64 `protobuf:"varint,2,opt,name=spaceDeletionTimestamp,proto3" json:"spaceDeletionTimestamp,omitempty"`
} }
func (m *SpaceSettingsSnapshot) Reset() { *m = SpaceSettingsSnapshot{} } func (m *SpaceSettingsSnapshot) Reset() { *m = SpaceSettingsSnapshot{} }
func (m *SpaceSettingsSnapshot) String() string { return proto.CompactTextString(m) } func (m *SpaceSettingsSnapshot) String() string { return proto.CompactTextString(m) }
func (*SpaceSettingsSnapshot) ProtoMessage() {} func (*SpaceSettingsSnapshot) ProtoMessage() {}
func (*SpaceSettingsSnapshot) Descriptor() ([]byte, []int) { func (*SpaceSettingsSnapshot) Descriptor() ([]byte, []int) {
return fileDescriptor_80e49f1f4ac27799, []int{16} return fileDescriptor_80e49f1f4ac27799, []int{17}
} }
func (m *SpaceSettingsSnapshot) XXX_Unmarshal(b []byte) error { func (m *SpaceSettingsSnapshot) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1028,6 +1087,13 @@ func (m *SpaceSettingsSnapshot) GetDeletedIds() []string {
return nil return nil
} }
func (m *SpaceSettingsSnapshot) GetSpaceDeletionTimestamp() int64 {
if m != nil {
return m.SpaceDeletionTimestamp
}
return 0
}
// SettingsData contains ObjectTree change payload // SettingsData contains ObjectTree change payload
type SettingsData struct { type SettingsData struct {
Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"` Content []*SpaceSettingsContent `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
@ -1038,7 +1104,7 @@ func (m *SettingsData) Reset() { *m = SettingsData{} }
func (m *SettingsData) String() string { return proto.CompactTextString(m) } func (m *SettingsData) String() string { return proto.CompactTextString(m) }
func (*SettingsData) ProtoMessage() {} func (*SettingsData) ProtoMessage() {}
func (*SettingsData) Descriptor() ([]byte, []int) { func (*SettingsData) Descriptor() ([]byte, []int) {
return fileDescriptor_80e49f1f4ac27799, []int{17} return fileDescriptor_80e49f1f4ac27799, []int{18}
} }
func (m *SettingsData) XXX_Unmarshal(b []byte) error { func (m *SettingsData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1090,7 +1156,7 @@ func (m *SpaceSubscription) Reset() { *m = SpaceSubscription{} }
func (m *SpaceSubscription) String() string { return proto.CompactTextString(m) } func (m *SpaceSubscription) String() string { return proto.CompactTextString(m) }
func (*SpaceSubscription) ProtoMessage() {} func (*SpaceSubscription) ProtoMessage() {}
func (*SpaceSubscription) Descriptor() ([]byte, []int) { func (*SpaceSubscription) Descriptor() ([]byte, []int) {
return fileDescriptor_80e49f1f4ac27799, []int{18} return fileDescriptor_80e49f1f4ac27799, []int{19}
} }
func (m *SpaceSubscription) XXX_Unmarshal(b []byte) error { func (m *SpaceSubscription) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1152,6 +1218,7 @@ func init() {
proto.RegisterType((*RawSpaceHeaderWithId)(nil), "spacesync.RawSpaceHeaderWithId") proto.RegisterType((*RawSpaceHeaderWithId)(nil), "spacesync.RawSpaceHeaderWithId")
proto.RegisterType((*SpaceSettingsContent)(nil), "spacesync.SpaceSettingsContent") proto.RegisterType((*SpaceSettingsContent)(nil), "spacesync.SpaceSettingsContent")
proto.RegisterType((*ObjectDelete)(nil), "spacesync.ObjectDelete") proto.RegisterType((*ObjectDelete)(nil), "spacesync.ObjectDelete")
proto.RegisterType((*SpaceDelete)(nil), "spacesync.SpaceDelete")
proto.RegisterType((*SpaceSettingsSnapshot)(nil), "spacesync.SpaceSettingsSnapshot") proto.RegisterType((*SpaceSettingsSnapshot)(nil), "spacesync.SpaceSettingsSnapshot")
proto.RegisterType((*SettingsData)(nil), "spacesync.SettingsData") proto.RegisterType((*SettingsData)(nil), "spacesync.SettingsData")
proto.RegisterType((*SpaceSubscription)(nil), "spacesync.SpaceSubscription") proto.RegisterType((*SpaceSubscription)(nil), "spacesync.SpaceSubscription")
@ -1162,68 +1229,70 @@ func init() {
} }
var fileDescriptor_80e49f1f4ac27799 = []byte{ var fileDescriptor_80e49f1f4ac27799 = []byte{
// 971 bytes of a gzipped FileDescriptorProto // 1007 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4b, 0x6f, 0xdb, 0xc6, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcb, 0x6f, 0x1b, 0x45,
0x13, 0x17, 0xe5, 0xa7,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e1, 0x94, 0xee, 0x08, 0x01, 0xaf, 0xb8, 0xbc, 0x23, 0x95, 0x30, 0x3a, 0x45,
0xd5, 0x6f, 0x7d, 0xdb, 0xbb, 0xf9, 0xdf, 0xa5, 0xb3, 0x4d, 0xf3, 0xe7, 0xe9, 0xbf, 0x01, 0x00, 0x07, 0x4b, 0x2f, 0xb7, 0x74, 0x96, 0xbb, 0x1f, 0x94, 0x1e, 0x3a, 0x8f, 0x9c, 0x17, 0x9f, 0xfe,
0x00, 0xff, 0xff, 0x23, 0x56, 0x6f, 0xd6, 0x53, 0x09, 0x00, 0x00, 0x7d, 0xd5, 0x73, 0xde, 0x5f, 0xf5, 0x9c, 0x7f, 0xaf, 0x7a, 0xce, 0x6f, 0xd7, 0xbd, 0xc6, 0xfb,
0xeb, 0x5e, 0xe3, 0x9f, 0xeb, 0x5e, 0xe3, 0xbb, 0xee, 0xea, 0x7f, 0xe8, 0xce, 0x37, 0xcd, 0x9f,
0x27, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x33, 0x0a, 0x59, 0xe5, 0xf5, 0x09, 0x00, 0x00,
} }
func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) { func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) {
@ -1856,6 +1925,27 @@ func (m *SpaceSettingsContent_ObjectDelete) MarshalToSizedBuffer(dAtA []byte) (i
} }
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *SpaceSettingsContent_SpaceDelete) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SpaceSettingsContent_SpaceDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.SpaceDelete != nil {
{
size, err := m.SpaceDelete.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSpacesync(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
return len(dAtA) - i, nil
}
func (m *ObjectDelete) Marshal() (dAtA []byte, err error) { func (m *ObjectDelete) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
@ -1886,6 +1976,34 @@ func (m *ObjectDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *SpaceDelete) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *SpaceDelete) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *SpaceDelete) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Timestamp != 0 {
i = encodeVarintSpacesync(dAtA, i, uint64(m.Timestamp))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *SpaceSettingsSnapshot) Marshal() (dAtA []byte, err error) { func (m *SpaceSettingsSnapshot) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
@ -1906,6 +2024,11 @@ func (m *SpaceSettingsSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.SpaceDeletionTimestamp != 0 {
i = encodeVarintSpacesync(dAtA, i, uint64(m.SpaceDeletionTimestamp))
i--
dAtA[i] = 0x10
}
if len(m.DeletedIds) > 0 { if len(m.DeletedIds) > 0 {
for iNdEx := len(m.DeletedIds) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.DeletedIds) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.DeletedIds[iNdEx]) i -= len(m.DeletedIds[iNdEx])
@ -2297,6 +2420,18 @@ func (m *SpaceSettingsContent_ObjectDelete) Size() (n int) {
} }
return n return n
} }
func (m *SpaceSettingsContent_SpaceDelete) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.SpaceDelete != nil {
l = m.SpaceDelete.Size()
n += 1 + l + sovSpacesync(uint64(l))
}
return n
}
func (m *ObjectDelete) Size() (n int) { func (m *ObjectDelete) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -2310,6 +2445,18 @@ func (m *ObjectDelete) Size() (n int) {
return n return n
} }
func (m *SpaceDelete) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Timestamp != 0 {
n += 1 + sovSpacesync(uint64(m.Timestamp))
}
return n
}
func (m *SpaceSettingsSnapshot) Size() (n int) { func (m *SpaceSettingsSnapshot) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
@ -2322,6 +2469,9 @@ func (m *SpaceSettingsSnapshot) Size() (n int) {
n += 1 + l + sovSpacesync(uint64(l)) n += 1 + l + sovSpacesync(uint64(l))
} }
} }
if m.SpaceDeletionTimestamp != 0 {
n += 1 + sovSpacesync(uint64(m.SpaceDeletionTimestamp))
}
return n return n
} }
@ -4146,6 +4296,41 @@ func (m *SpaceSettingsContent) Unmarshal(dAtA []byte) error {
} }
m.Value = &SpaceSettingsContent_ObjectDelete{v} m.Value = &SpaceSettingsContent_ObjectDelete{v}
iNdEx = postIndex iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceDelete", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSpacesync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthSpacesync
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthSpacesync
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &SpaceDelete{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Value = &SpaceSettingsContent_SpaceDelete{v}
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipSpacesync(dAtA[iNdEx:]) skippy, err := skipSpacesync(dAtA[iNdEx:])
@ -4249,6 +4434,75 @@ func (m *ObjectDelete) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *SpaceDelete) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSpacesync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: SpaceDelete: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SpaceDelete: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
}
m.Timestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSpacesync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Timestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSpacesync(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthSpacesync
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *SpaceSettingsSnapshot) Unmarshal(dAtA []byte) error { func (m *SpaceSettingsSnapshot) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
@ -4310,6 +4564,25 @@ func (m *SpaceSettingsSnapshot) Unmarshal(dAtA []byte) error {
} }
m.DeletedIds = append(m.DeletedIds, string(dAtA[iNdEx:postIndex])) m.DeletedIds = append(m.DeletedIds, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SpaceDeletionTimestamp", wireType)
}
m.SpaceDeletionTimestamp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSpacesync
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SpaceDeletionTimestamp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipSpacesync(dAtA[iNdEx:]) skippy, err := skipSpacesync(dAtA[iNdEx:])