forked from TrueCloudLab/frostfs-node
[#208] deletesvc: Resolve containedctx linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4941926c9d
commit
5f2a1531fe
5 changed files with 46 additions and 49 deletions
|
@ -1,25 +1,27 @@
|
|||
package deletesvc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func (exec *execCtx) executeLocal() {
|
||||
func (exec *execCtx) executeLocal(ctx context.Context) {
|
||||
exec.log.Debug("forming tombstone structure...")
|
||||
|
||||
ok := exec.formTombstone()
|
||||
ok := exec.formTombstone(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
exec.log.Debug("tombstone structure successfully formed, saving...")
|
||||
|
||||
exec.saveTombstone()
|
||||
exec.saveTombstone(ctx)
|
||||
}
|
||||
|
||||
func (exec *execCtx) formTombstone() (ok bool) {
|
||||
func (exec *execCtx) formTombstone(ctx context.Context) (ok bool) {
|
||||
tsLifetime, err := exec.svc.netInfo.TombstoneLifetime()
|
||||
if err != nil {
|
||||
exec.status = statusUndefined
|
||||
|
@ -40,7 +42,7 @@ func (exec *execCtx) formTombstone() (ok bool) {
|
|||
|
||||
exec.log.Debug("forming split info...")
|
||||
|
||||
ok = exec.formSplitInfo()
|
||||
ok = exec.formSplitInfo(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
@ -49,7 +51,7 @@ func (exec *execCtx) formTombstone() (ok bool) {
|
|||
|
||||
exec.tombstone.SetSplitID(exec.splitInfo.SplitID())
|
||||
|
||||
ok = exec.collectMembers()
|
||||
ok = exec.collectMembers(ctx)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue