-
-
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
Explicitally use BufferedDAG after removing Batch from importers #5626
Conversation
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.
Could you split the Gx update in a separate commit to make it easier to see the changes to the logic?
79e3202
to
5b996cc
Compare
@schomatis done. |
core/coreunix/add.go
Outdated
@@ -47,13 +47,31 @@ type Object struct { | |||
Size string | |||
} | |||
|
|||
// A batch-adding dag service for use with importers (and only for that) | |||
// Always Commit() after adding. | |||
type batching struct { |
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.
Unless we make the DagBuilderHelper
take separately an ipld.NodeAdder
and an ipld.NodeGetter
(or an adder + a separate DAGService
) rather than just a DAGService
, we need to wrap Batch in a DAGService
, as it seems trickle
uses Get
.
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.
If it uses get as I think it does, we probably need to commit before calling get. Let's go with plan b and make Batch implement DAGService (flushing on get). (unless you can think of a better solution)
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.
@Stebalien yeah i'll do that to be on the safe side.
5b996cc
to
2d7033c
Compare
@Stebalien @schomatis this ready using |
I'm not sure test failures have anything to do with this |
2d7033c
to
349925e
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.
LGTM
349925e
to
9fde50b
Compare
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
9fde50b
to
8709e55
Compare
@@ -49,11 +49,14 @@ type Object struct { | |||
|
|||
// NewAdder Returns a new Adder used for a file add operation. | |||
func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCBlockstore, ds ipld.DAGService) (*Adder, error) { | |||
bufferedDS := ipld.NewBufferedDAG(ctx, ds) |
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'll probably refactor this to happen on the coreapi layer (next to offline/sessions stuff), but this is good enough for now
See:
Needed Bubbles: