blobovnicza: Use TTL for blobovnicza tree cache #1017
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1017
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:bugfix/1004-stuck-close-blob"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Postponed till 0.38 released.
Close #1004, #866
Need to use a cache with control on how many times executed evict function for cache item.
Because most of the cache implementations just rewrite expired item without calling
onEvict
onput
, event ifkey
have the samevalue
.Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
@ -33,0 +35,4 @@
res := &dbCache{
cacheGuard: &sync.Mutex{},
wg: sync.WaitGroup{},
cancel: cancel,
I suppose to not to pass parentCtx but use
done
channel. This will reduce changes count.Disagree. We spent a lot of time to exclude using of the
close channel
approach. Routine for eviction may stop earlier thanblobstor
closed, but don't see any obstacles. When parent context cancelled, we need to stop service as faster as we can, because we have only 1m and a half until SIGKILL.I have asked this exact question when we were implementing this feature:
#875 (comment)
Has something changed?
Frankly, I would rather remove TTL handling for now (in v0.38, and reintroduce it in v0.39, with better testing). Seems safer than introducing another untested dependency.
blobovnicza: Use another expirable cacheto WIP: blobovnicza: Use another expirable cacheWIP: blobovnicza: Use another expirable cacheto WIP: blobovnicza: Use TTL for blobovnicza tree cachef85e12cd39
to9b54e8558b
9b54e8558b
toe896127e5d
Previous implementation of TTL for blobovnicza cache reverted in scope of #1018
Tested with dev-env&k6
WIP: blobovnicza: Use TTL for blobovnicza tree cacheto blobovnicza: Use TTL for blobovnicza tree cachee896127e5d
to835e8119e9
@ -122,3 +149,1 @@
if !isNonCached && !c.closed {
c.cache.Add(path, db)
return true
if isNonCached && c.closed {
It must be
if isNonCached || c.closed {
Thanks, fixed.
835e8119e9
to84370776f9
84370776f9
to8d367518e9
8d367518e9
to06725e85f3
0fc8e092df
to332d4d5a55
332d4d5a55
to2d8b5d207f
2d8b5d207f
toff93f2c928
ff93f2c928
to136fd4108f
136fd4108f
to0aa1bdb472
0aa1bdb472
tof18792eeee
f18792eeee
toc92090a1b9
c92090a1b9
toe76c7cd8b1
e76c7cd8b1
to64567a2218
@ -40,0 +44,4 @@
if ttl > 0 {
res.wg.Add(1)
go func() {
ticker := time.NewTicker(ttl / 100)
Magic constant
Also, why 100?
IMO some fixed interval is ok, so that we can say blobovnicza is closed after the time specified in config + e.g. 15 seconds.
@acid-ant
Thanks for the reminder, updated.
64567a2218
tod444988ee7
d444988ee7
to411a8d0245
Approved.
Sorry, I can't press Approve button because of Forgejo error.