diff --git a/satellite/audit/reverify_test.go b/satellite/audit/reverify_test.go index b01bca1ea..af6c00be5 100644 --- a/satellite/audit/reverify_test.go +++ b/satellite/audit/reverify_test.go @@ -942,11 +942,6 @@ func TestReverifyExpired1(t *testing.T) { report, err := audits.Verifier.Reverify(ctx, path) require.NoError(t, err) - // Reverify should delete the expired segment - pointer, err = satellite.Metainfo.Service.Get(ctx, metabase.SegmentKey(path)) - require.Error(t, err) - require.Nil(t, pointer) - assert.Len(t, report.Successes, 0) assert.Len(t, report.Fails, 0) assert.Len(t, report.Offlines, 0) @@ -1064,11 +1059,6 @@ func TestReverifyExpired2(t *testing.T) { require.Len(t, report.PendingAudits, 0) require.Len(t, report.Fails, 0) - // Reverify should delete the expired segment - pointer, err := satellite.Metainfo.Service.Get(ctx, metabase.SegmentKey(path1)) - require.Error(t, err) - require.Nil(t, pointer) - // Reverify should remove the node from containment mode _, err = containment.Get(ctx, pending.NodeID) require.Error(t, err) diff --git a/satellite/audit/verifier.go b/satellite/audit/verifier.go index 190b59b64..4d2376bcc 100644 --- a/satellite/audit/verifier.go +++ b/satellite/audit/verifier.go @@ -101,10 +101,6 @@ func (verifier *Verifier) Verify(ctx context.Context, path storj.Path, skip map[ return Report{}, err } if pointer.ExpirationDate != (time.Time{}) && pointer.ExpirationDate.Before(time.Now()) { - errDelete := verifier.metainfo.Delete(ctx, metabase.SegmentKey(path), pointerBytes) - if errDelete != nil { - return Report{}, Error.Wrap(errDelete) - } verifier.log.Debug("segment expired before Verify") return Report{}, nil } @@ -388,7 +384,7 @@ func (verifier *Verifier) Reverify(ctx context.Context, path storj.Path) (report err error } - pointerBytes, pointer, err := verifier.metainfo.GetWithBytes(ctx, metabase.SegmentKey(path)) + pointer, err := verifier.metainfo.Get(ctx, metabase.SegmentKey(path)) if err != nil { if storj.ErrObjectNotFound.Has(err) { verifier.log.Debug("segment deleted before Reverify") @@ -397,10 +393,6 @@ func (verifier *Verifier) Reverify(ctx context.Context, path storj.Path) (report return Report{}, err } if pointer.ExpirationDate != (time.Time{}) && pointer.ExpirationDate.Before(time.Now()) { - errDelete := verifier.metainfo.Delete(ctx, metabase.SegmentKey(path), pointerBytes) - if errDelete != nil { - return Report{}, Error.Wrap(errDelete) - } verifier.log.Debug("Segment expired before Reverify") return Report{}, nil } @@ -472,10 +464,6 @@ func (verifier *Verifier) Reverify(ctx context.Context, path storj.Path) (report return } if pendingPointer.ExpirationDate != (time.Time{}) && pendingPointer.ExpirationDate.Before(time.Now().UTC()) { - errDelete := verifier.metainfo.Delete(ctx, metabase.SegmentKey(pending.Path), pendingPointerBytes) - if errDelete != nil { - verifier.log.Debug("Reverify: error deleting expired segment", zap.Stringer("Node ID", pending.NodeID), zap.Error(errDelete)) - } verifier.log.Debug("Reverify: segment already expired", zap.Stringer("Node ID", pending.NodeID)) ch <- result{nodeID: pending.NodeID, status: skipped} return diff --git a/satellite/audit/verifier_test.go b/satellite/audit/verifier_test.go index f1f828d90..0974004d8 100644 --- a/satellite/audit/verifier_test.go +++ b/satellite/audit/verifier_test.go @@ -420,11 +420,6 @@ func TestVerifierExpired(t *testing.T) { report, err := audits.Verifier.Verify(ctx, path, nil) require.NoError(t, err) - // Verify should delete the expired segment - pointer, err = satellite.Metainfo.Service.Get(ctx, metabase.SegmentKey(path)) - require.Error(t, err) - require.Nil(t, pointer) - assert.Len(t, report.Successes, 0) assert.Len(t, report.Fails, 0) assert.Len(t, report.Offlines, 0)