[#1219] object/delete: Change approach of the tombstone broadcast

After `putsvc.Service` started to support additional container broadcast
of the saved objects there is no more need to perform broadcast of
tombstone object in `deletesvc.Service`.

Make `putsvc.Service` to perform additional broadcast of `TOMBSTONE`
objects. Remove `broadcastTombstone` stage from `deletesvc.execCtx`,
from now it is encapsulated in `saveTombstone` stage. Remove no longer
needed `putsvc.PutInitPrm.WithTraverseOption` method.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-03-05 13:43:13 +03:00 committed by LeL
parent a55af18ad1
commit 14ea7b2c47
6 changed files with 11 additions and 43 deletions

View file

@ -6,7 +6,6 @@ import (
getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get"
putsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/put"
searchsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/search"
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
oidSDK "github.com/nspcc-dev/neofs-sdk-go/object/id"
@ -102,7 +101,7 @@ func (s *simpleIDWriter) WriteIDs(ids []*oidSDK.ID) error {
return nil
}
func (w *putSvcWrapper) put(exec *execCtx, broadcast bool) (*oidSDK.ID, error) {
func (w *putSvcWrapper) put(exec *execCtx) (*oidSDK.ID, error) {
streamer, err := (*putsvc.Service)(w).Put(exec.context())
if err != nil {
return nil, err
@ -114,10 +113,6 @@ func (w *putSvcWrapper) put(exec *execCtx, broadcast bool) (*oidSDK.ID, error) {
WithCommonPrm(exec.commonParameters()).
WithObject(exec.tombstoneObj.CutPayload())
if broadcast {
initPrm.WithTraverseOption(placement.WithoutSuccessTracking())
}
err = streamer.Init(initPrm)
if err != nil {
return nil, err