Skip to content
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

coreapi: dag: Batching interface #5340

Merged
merged 3 commits into from
Aug 7, 2018
Merged

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Aug 3, 2018

I think this is the nicest way to get batching in coreapi, but if you have some better ideas, I'm happy to hear them

Part of #5215 / #4498

License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
@magik6k magik6k added the topic/core-api Topic core-api label Aug 3, 2018
@magik6k magik6k requested a review from Kubuxu as a code owner August 3, 2018 16:16
@ghost ghost assigned magik6k Aug 3, 2018
@ghost ghost added the status/in-progress In progress label Aug 3, 2018
DagOps

// Commit commits nodes to the datastore and announces them to the network
Commit(ctx context.Context) error
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: need this context for go-ipfs-api implementation (batch will hold a connection and stream files to dag/put)

License: MIT
Signed-off-by: Łukasz Magiera <[email protected]>
// DagAPI specifies the interface to IPLD
type DagAPI interface {
// DagOps groups operations that can be batched together
type DagOps interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will probably also have Delete on this interface, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there isn't dag rm so I didn't add it here. But yes, that would be the place for that (will be in Block API, but that's for a separate PR)

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me, Only thing is whether or not we want to add batch deletes right now, or do it later. If you want to do it later, then this LGTM and we can ship it

@whyrusleeping whyrusleeping merged commit b0d9dfc into master Aug 7, 2018
@whyrusleeping whyrusleeping deleted the feat/coreapi/dagbatch branch August 7, 2018 02:14
@ghost ghost removed the status/in-progress In progress label Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/core-api Topic core-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants