Skip to content

Differentiate garbage marks - #4122

Open
End-rey wants to merge 1 commit into
masterfrom
differentiate-garbage-marks
Open

Differentiate garbage marks#4122
End-rey wants to merge 1 commit into
masterfrom
differentiate-garbage-marks

Conversation

@End-rey

@End-rey End-rey commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes #4019.

@End-rey End-rey self-assigned this Aug 10, 2026
@End-rey
End-rey force-pushed the differentiate-garbage-marks branch from e838c6c to ad06444 Compare August 10, 2026 08:20
Comment thread pkg/local_object_storage/engine/delete.go Outdated
Comment thread pkg/local_object_storage/metabase/exists.go Outdated
Comment thread pkg/local_object_storage/metabase/inhume.go Outdated
Comment thread pkg/local_object_storage/metabase/inhume.go Outdated
@End-rey
End-rey force-pushed the policer-object-availability branch from 2e836cc to 6a7846d Compare August 10, 2026 16:00
@End-rey
End-rey force-pushed the differentiate-garbage-marks branch from ad06444 to f12d78c Compare August 10, 2026 16:42
@End-rey
End-rey force-pushed the policer-object-availability branch from 6a7846d to fd45d09 Compare August 11, 2026 10:33

@carpawell carpawell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have implemented nspcc-dev/neofs-api#348 but not used anywhere as its usage was questionable. Then we have an optimistic #4125 that always tries to GET without indexes. Then we have this PR that drops indexes only as a fallback when normal placement does not work. So what do we do? @roman-khimov

Comment thread pkg/services/object/get/ec.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is "an availability error"?

//
// Returns [apistatus.ErrObjectAlreadyRemoved] if the object was marked for
// removal.
func (s *Service) restoreFromECPartsByRule(ctx context.Context, cnr cid.ID, parent oid.ID, rule iec.Rule, ruleIdx int, sortedNodes []netmap.NodeInfo) (object.Object, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs can be adjusted now?

Comment thread pkg/services/object/get/ec.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it expected? we requested EC part but got a non-regular object

Comment thread pkg/services/object/get/ec.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

received object ID and other err context may be useful. it is just part index is set, rule index is not or smth like that now

Comment thread pkg/services/object/get/ec.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is the second time you decode attributes for the remote nodes case (getAnyECPartFromNode). can it be done in a single place?

Comment thread pkg/services/object/get/ec.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as i see, in the end there is always dst ObjectWriter but even for the happy path we are collecting all the EC parts in memory without streaming them, right? and after collecting them, we are even concatenating them into a single slice?

Comment thread pkg/services/object/get/get.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what this part do? i think it is better to extend/change checkECPartInfoGetRequest to get what you need there without repeating


// MarkGarbage marks objects to be physically removed from shard. Redundant
// objects remain readable until they are physically removed by GC.
func (db *DB) MarkGarbage(cnr cid.ID, addrs []oid.ID, mark GarbageMark) (ContainerGarbageDiff, error) {

@carpawell carpawell Aug 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would check that the mark is known. otherwise, we may end up with a broken metabase with deleted objects no one knows why

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@carpawell

Copy link
Copy Markdown
Member

Conflicts btw.

@roman-khimov

Copy link
Copy Markdown
Member

GC marks are separate from #4119 to me. And #4119 itself has conceptual problems, think of REP handling wrt the same issue and object moved from B to A while fetcher goes from A to B. Nothing can help in this case, only some larger window of availability on B relative to GC doing its job. And it's exactly the same problem as with EC, so EC should not do any retries. Then #4125 is a different beast, it tries a different strategy and if it works better --- it should just be used as a replacement for current one.

@End-rey
End-rey force-pushed the differentiate-garbage-marks branch from f12d78c to ca245dd Compare August 12, 2026 13:04
@End-rey
End-rey changed the base branch from policer-object-availability to master August 12, 2026 13:04
@End-rey
End-rey force-pushed the differentiate-garbage-marks branch from ca245dd to e493b7a Compare August 12, 2026 13:18
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.12%. Comparing base (64d89c8) to head (cc1291b).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
pkg/local_object_storage/metabase/inhume.go 84.21% 2 Missing and 1 partial ⚠️
pkg/local_object_storage/engine/delete.go 66.66% 1 Missing ⚠️
pkg/local_object_storage/shard/inhume.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4122      +/-   ##
==========================================
- Coverage   27.18%   27.12%   -0.07%     
==========================================
  Files         677      678       +1     
  Lines       46210    46109     -101     
==========================================
- Hits        12562    12505      -57     
+ Misses      32447    32418      -29     
+ Partials     1201     1186      -15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pkg/local_object_storage/metabase/exists.go Outdated
Comment thread pkg/services/object/get/remote.go Outdated
Comment thread pkg/services/object/get/container.go Outdated
@End-rey
End-rey force-pushed the differentiate-garbage-marks branch 2 times, most recently from 033a01d to bf02a0f Compare August 12, 2026 17:35
Comment thread pkg/local_object_storage/metabase/exists.go Outdated
Differentiate garbage marks for redundant policer copies from logical object
removal. Keep such copies readable until GC removes them.

Closes #4019.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@End-rey
End-rey force-pushed the differentiate-garbage-marks branch from bf02a0f to cc1291b Compare August 12, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Policer work can break availability of objects (EC)

3 participants