Skip to content

Conversation

cthulhu-rider
Copy link
Contributor

@cthulhu-rider cthulhu-rider commented Aug 29, 2025

will help adapt Policer to EC policies

Copy link

codecov bot commented Aug 29, 2025

Codecov Report

❌ Patch coverage is 44.89796% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.66%. Comparing base (a5ffd32) to head (9a91db4).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
...t_storage/blobstor/internal/storagetest/iterate.go 0.00% 9 Missing ⚠️
pkg/services/policer/check.go 52.63% 8 Missing and 1 partial ⚠️
pkg/services/policer/process.go 62.50% 3 Missing ⚠️
pkg/local_object_storage/engine/select.go 33.33% 2 Missing ⚠️
pkg/services/policer/reload.go 0.00% 2 Missing ⚠️
pkg/services/control/server/evacuate.go 0.00% 1 Missing ⚠️
pkg/services/policer/policer.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3553      +/-   ##
==========================================
+ Coverage   25.65%   25.66%   +0.01%     
==========================================
  Files         661      659       -2     
  Lines       49451    49373      -78     
==========================================
- Hits        12688    12673      -15     
+ Misses      35755    35695      -60     
+ Partials     1008     1005       -3     

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

@cthulhu-rider cthulhu-rider marked this pull request as ready for review August 29, 2025 14:01
@cthulhu-rider cthulhu-rider marked this pull request as draft August 29, 2025 14:23
@cthulhu-rider cthulhu-rider force-pushed the policer-placement branch 2 times, most recently from 90e2461 to 43bd34d Compare August 29, 2025 15:52
@cthulhu-rider cthulhu-rider marked this pull request as ready for review August 29, 2025 15:55
@cthulhu-rider cthulhu-rider marked this pull request as draft September 1, 2025 10:14
@cthulhu-rider cthulhu-rider force-pushed the policer-placement branch 2 times, most recently from c1bea86 to aa85686 Compare September 2, 2025 14:33
@cthulhu-rider cthulhu-rider mentioned this pull request Sep 2, 2025
@cthulhu-rider cthulhu-rider marked this pull request as ready for review September 4, 2025 10:22
// Returns other errors of h directly.
//
// Does not modify tss.
func (db *DB) IterateCoveredByTombstones(tss map[string]oid.Address, h func(oid.Address) error) error {
Copy link
Member

Choose a reason for hiding this comment

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

@End-rey, is it of any use for GC?

Copy link
Member

Choose a reason for hiding this comment

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

OK, let's deal with it in #3559.

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 understand it, we are mainly looking at the lifetime of an object, and therefore there is no point in iterating over tombstones.

In addition to simplifying the code, caching of results is added. Since
cache is not protected from slice mutations, loop filling candidate
slice is adapted.

Also refactor local node identifier.

Will be also useful to implement processing of objects from containers
with EC (#3420).

Refs #1988.

Signed-off-by: Leonard Lyubich <[email protected]>
There is no actual need to calculate it for some container precisely.
The container was mocked anyway.

Signed-off-by: Leonard Lyubich <[email protected]>
It was used only in tests with a single local implementation.

Signed-off-by: Leonard Lyubich <[email protected]>
Container ID, object ID and address are comparable, so there is no need
to additionally encode them into strings. Dropping stringers slightly
improves performance and simplifies code.

Signed-off-by: Leonard Lyubich <[email protected]>
The only case it was passed was a function around local storage which is
a Policer parameter itself.

Signed-off-by: Leonard Lyubich <[email protected]>
This resulted in inheritance of `sync.RWMutex` interface that was not
used and was not usable at all.

Signed-off-by: Leonard Lyubich <[email protected]>
@roman-khimov roman-khimov merged commit adf5444 into master Sep 5, 2025
21 of 22 checks passed
@roman-khimov roman-khimov deleted the policer-placement branch September 5, 2025 06:34
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