Skip to content

sn/meta: submit only parent object for EC split#4059

Draft
carpawell wants to merge 2 commits into
masterfrom
feat/submit-only-EC-parent-meta
Draft

sn/meta: submit only parent object for EC split#4059
carpawell wants to merge 2 commits into
masterfrom
feat/submit-only-EC-parent-meta

Conversation

@carpawell

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.84%. Comparing base (26200b4) to head (a252bfc).

Files with missing lines Patch % Lines
pkg/services/object/put/streamer.go 33.33% 5 Missing and 1 partial ⚠️
pkg/services/object/server.go 85.00% 3 Missing and 3 partials ⚠️
pkg/services/object/put/distributed.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4059      +/-   ##
==========================================
+ Coverage   26.79%   26.84%   +0.04%     
==========================================
  Files         687      687              
  Lines       46575    46612      +37     
==========================================
+ Hits        12482    12512      +30     
- Misses      32959    32965       +6     
- Partials     1134     1135       +1     

☔ 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.

@carpawell

Copy link
Copy Markdown
Member Author

@roman-khimov, taking into account this, it means there will be as many objects in meta as there are small splits for REPs plus an object for every EC rule.

@carpawell carpawell force-pushed the feat/submit-only-EC-parent-meta branch from 001e9e9 to a460692 Compare July 3, 2026 16:28
@carpawell

Copy link
Copy Markdown
Member Author

Would like to wait for full tests.

@carpawell carpawell force-pushed the feat/submit-only-EC-parent-meta branch 2 times, most recently from 950bd07 to afbf11f Compare July 6, 2026 14:02
carpawell added 2 commits July 6, 2026 17:05
For containers of both types of policies (and for EC-only too) wrong number of
placement vectors was used.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
@carpawell carpawell marked this pull request as ready for review July 6, 2026 14:06
@carpawell carpawell force-pushed the feat/submit-only-EC-parent-meta branch from afbf11f to a252bfc Compare July 6, 2026 14:36
return true
}

// submit meta only for last EC part in every rule

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.

A single signature?

}

tx, dataToSign := objectcore.EncodeChainMetaInfo(len(t.containerNodes.PrimaryCounts()), obj.GetContainerID(), obj.GetID(), firstObj, obj.GetPreviousID(),
tx, dataToSign := objectcore.EncodeChainMetaInfo(len(t.containerNodes.PrimaryCounts())+len(t.containerNodes.ECRules()), obj.GetContainerID(), obj.GetID(), firstObj, obj.GetPreviousID(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

how was this problem discovered?

default:
}

_, repRules, ecRules, err := s.fsChain.SelectContainerNodes(o.GetContainerID())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

couldn't they have been taken from cnr?

return true
}

// submit meta only for last EC part in every rule

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's so special about the last parity part?

_, secondMeta := objectcore.EncodeChainMetaInfo(placementVectorsNum, o.GetContainerID(), o.GetID(), firstObj, prevObj, o.PayloadSize(), typ, deleted, locked, secondBlock, s.meta.MagicNumber())
_, thirdMeta := objectcore.EncodeChainMetaInfo(placementVectorsNum, o.GetContainerID(), o.GetID(), firstObj, prevObj, o.PayloadSize(), typ, deleted, locked, thirdBlock, s.meta.MagicNumber())
var (
currentBlock = s.meta.Height()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

so much code shifts just to pack into var (). I'd do such changes in separate commits

} else {
_, firstMeta = objectcore.EncodeChainMetaInfo(placementVectorsNum, cID, oID, firstObj, prevObj, payloadSize, typ, deleted, locked, firstBlock, magic)
_, secondMeta = objectcore.EncodeChainMetaInfo(placementVectorsNum, cID, oID, firstObj, prevObj, payloadSize, typ, deleted, locked, secondBlock, magic)
_, thirdMeta = objectcore.EncodeChainMetaInfo(placementVectorsNum, cID, oID, firstObj, prevObj, payloadSize, typ, deleted, locked, thirdBlock, magic)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

6 very similar lines, so it's hard to me to see the diff. Suggest to either func out or conditionally parameterize args before

)
if mustSignParent(o, ecRules) {
par := o.Parent()
if par == nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

inobvious requirement for mustSignParent condition. Suggest to call it as is isLastECPart

@carpawell carpawell marked this pull request as draft July 10, 2026 16:00
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