Skip to content

Support unpaid containers rollback #3692

@carpawell

Description

@carpawell

When an unpaid container is dropped (from SN's storage, not from the whole network) no SN is going to update load reports with zero values (but the container still exists), so no new object can be accepted even if balance > 0.

Expected Behavior

  1. You have not enough balance, you lose your data.
  2. You store zero bytes, but you have positive balace still, you should be able to start your NeoFS life from scratch.
  3. You are able to store objects and pay for them again.

Current Behavior

Very likely, SNs stop reporting values after no container info is found in metabase:

// Estimations
bktEstimations := tx.Bucket(containerVolumeBucketName)
err := bktEstimations.DeleteBucket(cIDRaw)
if err != nil && !errors.Is(err, bolterrors.ErrBucketNotFound) {
return fmt.Errorf("estimations bucket cleanup: %w", err)
}
, so fake reports are stuck forever.

Possible Solution

Have two versions of DeleteContainer (bool flag maybe): one is for complete container removal (event from FS chain), and one for data cleanup only.

Steps to Reproduce (for bugs)

  1. Store objects
  2. Remember its reports
  3. Stop paying for the container
  4. Wait for next epoch, and look at load reports

Context

#3650 (comment)

Regression

No

Your Environment

v0.50.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    I3Minimal impactS3Minimally significantU4Nothing urgentbugSomething isn't workingneofs-storageStorage node application issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions