Improve flushing scheme for badger-backed writecache #568
Labels
No Label
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 Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#568
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
The batching scheme used during boltdb-backed writecache implementation might not be relevant to a badger-backed implementation. Consider improving.
See: #462 (comment)
See:
65c72f3e0b/pkg/local_object_storage/writecache/flush.go (L98)
To flush we iterate over everything, but badger also has
db.Subscribe
which can come handydb.Subscribe
is blocking call, so we need to run it in a separate routine. But in this case there are possible situation when we lost some changes. See this PR for details: https://github.com/dgraph-io/badger/pull/1834It looks like much better to use badger.Stream