nspcc-dev / nspcc-dev/neofs-node

Object header is not accounted for when evaluating container size

Open Beginner friendly
#3,608 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug I4 neofs-storage S3 security U3
Dominant language
Go
Stars
38
Forks
51
Avg merge
1d 20h
Merged PRs (30d)
38

Description

Expected Behavior

Object has full size, header+payload, that's what we store and that's the disk space used by this object.

Current Behavior

Only payload size is counted for container size metrics and submissions.
https://github.com/nspcc-dev/neofs-node/blob/582380b995ff920c1cd4fe1384abb84e538dd4e8/pkg/local_object_storage/metabase/put.go#L94

Possible Solution

Count headers as well.

Think of counting temporary objects like locks and tombstones, they do require space and it's a vector for DoS.

Context

#3519, basic income.

Regression

No. It was always like that since 41578001e420492f70137e2ed07222c11ef5bdb3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/local_object_storage/metabase/put.go around line 94, where object size is accounted for. Trace how container size metrics and submissions use that value, including temporary objects such as locks and tombstones. Done means object headers are included alongside payloads wherever container space is counted.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.