Support unpaid containers rollback #1539

Open
opened 2025-12-28 17:35:46 +00:00 by sami · 1 comment
Owner

Originally created by @carpawell on GitHub (Nov 21, 2025).

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: nspcc-dev/neofs-node@a4005c91c9/pkg/local_object_storage/metabase/containers.go (L189-L194), 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

https://github.com/nspcc-dev/neofs-node/pull/3650#discussion_r2545359158

Regression

No

Your Environment

v0.50.0

Originally created by @carpawell on GitHub (Nov 21, 2025). <!-- Provide a general summary of the issue in the Title above --> 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: https://github.com/nspcc-dev/neofs-node/blob/a4005c91c97104a0181842f75e86d7230cdb10e0/pkg/local_object_storage/metabase/containers.go#L189-L194, 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 https://github.com/nspcc-dev/neofs-node/pull/3650#discussion_r2545359158 ## Regression No ## Your Environment v0.50.0
Author
Owner

@roman-khimov commented on GitHub (Nov 21, 2025):

You store zero bytes, but you have positive balace still, you should be able to start your NeoFS life from scratch.

At the same time you can always create a new container.

@roman-khimov commented on GitHub (Nov 21, 2025): > You store zero bytes, but you have positive balace still, you should be able to start your NeoFS life from scratch. At the same time you can always create a new container.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#1539
No description provided.