Seal writecache async #1284
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1284
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:feat/writecache_seal_async"
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?
This PR makes it possible to seal writecache async (in background).
1fad15aa87
toc828df5e1f
@ -102,0 +133,4 @@
if !m.NoMetabase() {
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
}
s.writecacheSealCancel.Store(dummyCancel)
To allow writecache seal only after
Init
c828df5e1f
to44975773a7
@ -102,0 +133,4 @@
if !m.NoMetabase() {
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
}
s.writecacheSealCancel.Store(dummyCancel)
Functional change. Other diff is just code refactor (method extract).
WIP: Seal writecache asyncto Seal writecache async@ -78,1 +98,3 @@
defer s.m.RUnlock()
if p.sync() {
defer func() {
What do you think about this non-functional change:
and use it in this line and below? :) Just make it little bit readable
done
44975773a7
tod824ee31be
@ -351,2 +359,4 @@
if s.hasWriteCache() {
prev := s.writecacheSealCancel.Swap(notInitializedCancel)
prev.cancel() // no need to wait: writecache.Seal and writecache.Close lock the same mutex
Could you explain, how having the same mutex makes it ok not to wait?
writecache.Close
will wait for thewritecache.Seal
end.@ -79,0 +101,4 @@
s.writecacheSealCancel.Store(dummyCancel)
}
if p.sync() {
To me it makes reading harder: here it is
p.sync()
, belowp.Async
, I needed to look atp.sync
definition to see if they correspond to the same thing.A controversial statement, but fixed.
d824ee31be
to33823f984b
@ -86,1 +116,4 @@
defer cleanup()
s.log.Info(logs.StartedWritecacheSealAsync)
if err := s.writeCache.Seal(context.WithoutCancel(ctx), p.IgnoreErrors); err != nil {
Is
seal
uncancellable?fixed
33823f984b
tobf8919333e
please, rebase
bf8919333e
to0dcc5e75e0
done
@ -83,2 +110,4 @@
defer cleanup()
}
if s.info.Mode.ReadOnly() {
If
p.Async == true && s.info.Mode.ReadOnly()
we will have non-dummy canceler inwritecacheSealCancel
and it won't be called on exit.It this intentional?
Shame on me! Thx! Fixed.
0dcc5e75e0
to80ce7c3a00
writecache seal
in async interface #953