Skip to content

Improve TS GC#3511

Merged
roman-khimov merged 2 commits intomasterfrom
ts-gc-improv
Aug 8, 2025
Merged

Improve TS GC#3511
roman-khimov merged 2 commits intomasterfrom
ts-gc-improv

Conversation

@roman-khimov
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 64.28571% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.59%. Comparing base (7eb04a3) to head (ceed724).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/local_object_storage/shard/gc.go 65.21% 6 Missing and 2 partials ⚠️
pkg/local_object_storage/engine/shards.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3511   +/-   ##
=======================================
  Coverage   23.58%   23.59%           
=======================================
  Files         669      669           
  Lines       50256    50278   +22     
=======================================
+ Hits        11855    11864    +9     
- Misses      37483    37493   +10     
- Partials      918      921    +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.

Each expired _shard_ object currently triggers engine-level operations. These
are mostly relevant for split objects and are absolutely useless for
tombstones because tombstones have no children and they can't be locked.
Therefore TS-related operations can be local to shard, what we need to do is
to drop them, so mark them garbage for now and let the other GC part handle
it.

I believe this is one of the things that triggered #3507 since we have a lot of
deleted objects in some containers and iterating over TSes just takes time.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Fixes #3507 where an incomplete GC cycle blocks event handler which then breaks
WS client which then can't be restarted because we're still handling an event.
It's not a huge problem to miss this event if things are still moving, there
will be a new one with a new epoch and it'll do the job anyway.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
return
}

err = s.MarkGarbage(false, expired...)
Copy link
Contributor

Choose a reason for hiding this comment

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

looking at the added code I seem to remember that it was like that once. Except maybe through a callback to the entire engine

@roman-khimov roman-khimov merged commit 1d9831a into master Aug 8, 2025
22 checks passed
@roman-khimov roman-khimov deleted the ts-gc-improv branch August 8, 2025 12:32
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