Skip to content

Fix/meta submit object#3591

Merged
roman-khimov merged 3 commits intomasterfrom
fix/meta-submit-object
Sep 25, 2025
Merged

Fix/meta submit object#3591
roman-khimov merged 3 commits intomasterfrom
fix/meta-submit-object

Conversation

@carpawell
Copy link
Member

@carpawell carpawell commented Sep 19, 2025

@carpawell carpawell self-assigned this Sep 19, 2025
@carpawell carpawell force-pushed the fix/meta-submit-object branch from 5ae4534 to 411fd4d Compare September 19, 2025 17:58
@codecov
Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 46.15385% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.64%. Comparing base (1869725) to head (14f5498).
⚠️ Report is 30 commits behind head on master.

Files with missing lines Patch % Lines
pkg/services/object/put/distributed.go 45.83% 12 Missing and 1 partial ⚠️
pkg/morph/client/container/meta.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3591      +/-   ##
==========================================
+ Coverage   26.60%   26.64%   +0.04%     
==========================================
  Files         655      655              
  Lines       49742    49702      -40     
==========================================
+ Hits        13232    13244      +12     
+ Misses      35466    35421      -45     
+ Partials     1044     1037       -7     

☔ 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 fix/meta-submit-object branch 4 times, most recently from 08f094b to b0f05e9 Compare September 23, 2025 16:09
@carpawell carpawell marked this pull request as ready for review September 23, 2025 16:10
return err
}

if t.localNodeInContainer && t.metainfoConsistencyAttr != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

is t.localOnly branch OK w/ this? seems like empty lists are sent in this case

also, if client puts prepared objects with TTL=1, signatures are not sent. Is that ok?

Copy link
Member

Choose a reason for hiding this comment

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

client puts prepared objects with TTL=1

I doubt we have any other option in this case. Client is doing something strange.

Copy link
Contributor

Choose a reason for hiding this comment

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

we submitted a signature previously. Is it impossible now?

Copy link
Member

Choose a reason for hiding this comment

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

This never worked correctly, a single signature is just not sufficient for a REP 3 container, transaction won't be accepted.

Copy link
Member Author

Choose a reason for hiding this comment

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

seems like empty lists are sent in this case

lets cancel this

also, if client puts prepared objects with TTL=1, signatures are not sent. Is that ok?

i do not know what we can do in this case, this is an explicit wish to store an object and do nothing with meta data, without remote nodes, it will not be accepted by the contract

Copy link
Member Author

@carpawell carpawell Sep 24, 2025

Choose a reason for hiding this comment

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

@roman-khimov, @cthulhu-rider, check the last commit. maybe we can log this. i do not know what TTL=1 PUT should do with meta containers

Copy link
Contributor

Choose a reason for hiding this comment

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

what TTL=1 PUT should do with meta containers

nothing. I thought that previously it worked, and dropping it is unrelated to the contract API fix. As it turns out, it didn't work before either. This could've been made into a separate patch, but I dont mind leaving it as is. Commit message remark as an option

Do not send signatures as a flat slice, use them as a two-dimensional matrix, as
it was meant to be according to NeoFS placement policies.
Refs https://github.com/nspcc-dev/neofs-contract/blob/50f4c2c6d83ec6661676a4059852f20fde11a78c/contracts/container/contract.go#L249
Refs neo-project/neo#1891.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This is likely will not be accepted (only in a strange case when there is REP 1
policy with the only local node).

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the fix/meta-submit-object branch from 72d284c to 14f5498 Compare September 24, 2025 11:45
}

if t.localNodeInContainer && t.metainfoConsistencyAttr != "" {
if !t.localOnly && t.localNodeInContainer && t.metainfoConsistencyAttr != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks correct now. We can now catch t.localOnly case before defer at the func's top, right?

@roman-khimov roman-khimov merged commit 5dadaaa into master Sep 25, 2025
22 checks passed
@roman-khimov roman-khimov deleted the fix/meta-submit-object branch September 25, 2025 05:54
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