Skip to content

Feat/support storage quotas#3572

Merged
roman-khimov merged 13 commits intomasterfrom
feat/support-storage-quotas
Sep 22, 2025
Merged

Feat/support storage quotas#3572
roman-khimov merged 13 commits intomasterfrom
feat/support-storage-quotas

Conversation

@carpawell
Copy link
Member

No description provided.

@carpawell carpawell force-pushed the feat/support-storage-quotas branch from 67f4482 to 28f0897 Compare September 11, 2025 21:38
@codecov
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 10.81081% with 594 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.59%. Comparing base (2145de6) to head (79c5102).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
cmd/neofs-adm/internal/modules/fschain/quota.go 0.00% 196 Missing ⚠️
pkg/morph/client/container/load.go 0.00% 100 Missing ⚠️
cmd/neofs-node/object.go 0.00% 76 Missing ⚠️
cmd/neofs-adm/internal/modules/fschain/nodes.go 0.00% 66 Missing ⚠️
pkg/innerring/processors/netmap/processor.go 0.00% 54 Missing ⚠️
pkg/morph/client/container/quotas.go 0.00% 48 Missing ⚠️
pkg/morph/client/container/nodes.go 0.00% 36 Missing ⚠️
...nnerring/processors/container/process_container.go 0.00% 8 Missing ⚠️
pkg/services/object/put/validation.go 78.94% 5 Missing and 3 partials ⚠️
cmd/neofs-node/config.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3572      +/-   ##
==========================================
- Coverage   26.66%   26.59%   -0.07%     
==========================================
  Files         654      655       +1     
  Lines       49374    49742     +368     
==========================================
+ Hits        13164    13228      +64     
- Misses      35164    35470     +306     
+ Partials     1046     1044       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@carpawell carpawell force-pushed the feat/support-storage-quotas branch from 28f0897 to 146a50e Compare September 11, 2025 21:43
@carpawell carpawell marked this pull request as ready for review September 11, 2025 21:43
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

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

finished a half

nm, err := cp.netState.NetMap()
if err != nil {
cp.log.Error("could not get netmap for Container contract update", zap.Stringer("cid", ctx.cID), zap.Error(err))
l.Error("could not get netmap for Container contract update", zap.Error(err))
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd separate refactoring from message/field addition

Copy link
Member Author

Choose a reason for hiding this comment

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

can you elaborate, please? the commit says improve container creation and list updating logging i meant adding CID too

added more commits since @roman-khimov also did not like it. hope i understood the suggestion

Copy link
Contributor

Choose a reason for hiding this comment

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

there was no need to change this line to add debug messages. Also thinking of #3409

Copy link
Member

Choose a reason for hiding this comment

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

On #3409 — I had this thought too, but container management operations are not comparable to object management operations, they're rare. Even pushing it to the limits in synthetic tests can't reach the same level of ops/s we have for objects.

Copy link
Member Author

@carpawell carpawell Sep 16, 2025

Choose a reason for hiding this comment

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

yeah, i did this while remembering the issue and did understand that this happens not even every epoch. in general, i do like zap.With option in the code, if it is not a hot part. i find it less error-prone

NumberOfObjects uint64
}

// FromStackItem implemetns [stackitem.Convertible].
Copy link
Contributor

Choose a reason for hiding this comment

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

as i already mentioned, i dont understand whats the reason to follow this interface

Copy link
Member Author

Choose a reason for hiding this comment

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

well, it does what we need, it converts VM type to go struct, that is descriptive. i do not insist, but neo-go dev found it usefull, i do not mind

Copy link
Contributor

Choose a reason for hiding this comment

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

at least i have no idea why it's exported. Ok, not a big deal

nm, err := cp.netState.NetMap()
if err != nil {
cp.log.Error("could not get netmap for Container contract update", zap.Stringer("cid", ctx.cID), zap.Error(err))
l.Error("could not get netmap for Container contract update", zap.Error(err))
Copy link
Member

Choose a reason for hiding this comment

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

On #3409 — I had this thought too, but container management operations are not comparable to object management operations, they're rare. Even pushing it to the limits in synthetic tests can't reach the same level of ops/s we have for objects.

@carpawell carpawell force-pushed the feat/support-storage-quotas branch from 8375c70 to 6ecb994 Compare September 16, 2025 13:54
@carpawell carpawell force-pushed the feat/support-storage-quotas branch 2 times, most recently from d890878 to 9d3c767 Compare September 16, 2025 16:40
if np.forceContainersListUpdate.Load() {
l.Info("forcing Container contract lists update...")

// fixing missing container lists from 0.45.0 release; for 0.49.0 only,
Copy link
Member

Choose a reason for hiding this comment

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

What's gonna be the behavior after the update but before epoch tick? Failure to submit estimations?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, if the update was successful, the lists are filled it is possible to report. but IRs must be updated at about the same time and ofc before SN updates

Copy link
Member Author

Choose a reason for hiding this comment

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

my bad, yes, only a tick will update the lists

Copy link
Member Author

Choose a reason for hiding this comment

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

in the first message, i explained my first thought (unimplemented currently). do it at the start of every IR?

Copy link
Member

Choose a reason for hiding this comment

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

It's better for upgrades, especially given that is has to be done once.

@carpawell carpawell force-pushed the feat/support-storage-quotas branch from 20e8cc7 to 9ca724d Compare September 17, 2025 14:58
@carpawell carpawell force-pushed the feat/support-storage-quotas branch 3 times, most recently from fa63a7a to 07962b9 Compare September 19, 2025 09:07
@roman-khimov
Copy link
Member

Needs to be rebased once again.

This supports nspcc-dev/neofs-contract#412.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Regression starting from b6689c3. For some
reason, in local installation with 1 out of 1 Alphabet signature it did not
fail with contract panic (but the contract do check for Alphabet signature)
and there were no messages about a failed call but still the contract was not
updated and no SNs could be found. Commit also adds one-time migration if there
is any empty container list in the network.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add start and success messages.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Where will not be estimations in the next contract release.
Refs nspcc-dev/neofs-contract#510.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
The old ones were dropped, there is no need in "new" suffixes.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Add support for quotas and total container and account sizes from
nspcc-dev/neofs-contract#514.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Refs nspcc-dev/neofs-contract#514.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Allows inspecting result from nspcc-dev/neofs-contract#438.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This was solved inside `List` method.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Also, update SDK to the latest version. Closes #3520.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the feat/support-storage-quotas branch from 07962b9 to 79c5102 Compare September 22, 2025 07:44
@roman-khimov roman-khimov merged commit 1869725 into master Sep 22, 2025
16 of 22 checks passed
@roman-khimov roman-khimov deleted the feat/support-storage-quotas branch September 22, 2025 08:30
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.

3 participants