Improve flushing scheme for badger-backed writecache #568
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#568
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The batching scheme used during boltdb-backed writecache implementation might not be relevant to a badger-backed implementation. Consider improving.
See: #462 (comment)
See:
// We put objects in batches of fixed size to not interfere with main put cycle a lot.
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