-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Asynchronous Datastores #6785
Conversation
ec25128
to
5e38739
Compare
a8cfdba
to
5e49b9d
Compare
0c867ba
to
a0b85d3
Compare
76c7c46
to
7e75734
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there has been a miscommunication or misunderstanding somewhere. Let's start over with a design proposal in #6775 that specifies the exact sequence of sync calls we need, where, and why.
Ok, now that I remember how the pinner is calling |
Sure, we can just call Sync on |
ac5af0b
to
328aac8
Compare
core/node/core.go
Outdated
pinning, err := pin.LoadPinner(repo.Datastore(), ds, internalDag) | ||
rootDS := repo.Datastore() | ||
|
||
syncFn := func() error { return rootDS.Sync(blockstore.BlockPrefix) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason the pinner needs to sync the Filestore is there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, yes. When pinning, we may reference blocks in the filestore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one change.
core/node/core.go
Outdated
pinning, err := pin.LoadPinner(repo.Datastore(), ds, internalDag) | ||
rootDS := repo.Datastore() | ||
|
||
syncFn := func() error { return rootDS.Sync(blockstore.BlockPrefix) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, yes. When pinning, we may reference blocks in the filestore.
328aac8
to
3a0d0e8
Compare
As part of #6775, we need to add Sync calls into the appropriate places in go-ipfs (and its dependencies).
The places that were deemed important to have Sync calls include: