Skip to content

Restore EC objects during policer relocation - #4119

Open
End-rey wants to merge 1 commit into
masterfrom
policer-object-availability
Open

Restore EC objects during policer relocation#4119
End-rey wants to merge 1 commit into
masterfrom
policer-object-availability

Conversation

@End-rey

@End-rey End-rey commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Refs #4019.

@End-rey End-rey self-assigned this Aug 7, 2026
@End-rey End-rey changed the title estore EC objects during policer relocation Restore EC objects during policer relocation Aug 7, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.80488% with 102 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.30%. Comparing base (36e3cf4) to head (6a7846d).

Files with missing lines Patch % Lines
pkg/services/object/get/ec.go 36.64% 94 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4119      +/-   ##
==========================================
+ Coverage   27.19%   27.30%   +0.11%     
==========================================
  Files         677      677              
  Lines       46206    46369     +163     
==========================================
+ Hits        12564    12661      +97     
- Misses      32442    32494      +52     
- Partials     1200     1214      +14     

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

@End-rey
End-rey force-pushed the policer-object-availability branch 2 times, most recently from 2e836cc to 6a7846d Compare August 10, 2026 16:00
Fallback to any EC part from each node when exact placement lookup fails.

Refs #4019.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
if s.neoFSNet.IsLocalNodePublicKey(sortedNodes[nodeIdx].PublicKey()) {
hdr, rc, err = s.localObjects.GetECPart(ctx, cnr, parent, iec.PartInfo{RuleIndex: ruleIdx, Index: nodeIdx}, true)
} else {
hdr, rc, err = s.getAnyECPartFromNode(ctx, cnr, parent, ruleIdx, sortedNodes[nodeIdx])

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.

Sequential? Slow.

s.log.Info("failed to restore EC object using exact part placement, trying any part per node",
zap.Stringer("container", cnr), zap.Stringer("object", parent), zap.Stringer("rule", rule), zap.Int("ruleIdx", ruleIdx), zap.Error(err))

return s.restoreFromAnyECPartsByRule(ctx, cnr, parent, rule, ruleIdx, sortedNodes, partial)

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.

I hope we can deduplicate these strategies in future, non-indexed one is more reliable in general, indexed one can't solve the case of part moving from node B to node A (with complete deletion on B so that garbage marks won't help) while object getter moves from A to B. But this requires more performance tests.

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.

2 participants