Cancel writecache background flush as soon as possible #1205
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1205
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/writecache_close_while_flushing"
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?
Scenario:
big
objectsfrostfs-node
tries to close writecacheWritecache will try to get
modeMtx
lock to cancel background flush, but lock is taken by big object flush worker.Closes #1201
@ -151,3 +151,3 @@
func (c *cache) workerFlushBig(ctx context.Context) {
tick := time.NewTicker(defaultFlushInterval * 10)
tick := time.NewTicker(defaultFlushInterval)
Please, describe the motivation behind this change in the commit message.
It can affect perfomance, as we do not currently remove empty directories automatically.
Done.
It looks like it's some kind of debug code. This code appeared in the very first cache implementation without any explanation.
It was actually intentional, because we should have less big objects and more small ones.
Iterating over the DB is much cheaper that touching filesystem.
I would introduce a separate constant for big iteration, as the magic constant is indeed the problem.
Ok, dropped commit with this change.
86be1fa186
to62f7a2e4cc
62f7a2e4cc
tocde7b266fc
cde7b266fc
to4c7ff159ec