nspcc-dev / nspcc-dev/neofs-node
Object header is not accounted for when evaluating container size
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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