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

Update Datastore Interface #60

Merged
merged 1 commit into from
Dec 3, 2019
Merged

Update Datastore Interface #60

merged 1 commit into from
Dec 3, 2019

Conversation

aschmahmann
Copy link
Contributor

Per ipfs/go-datastore#140 the Datastore interface is being updated to support asynchronous writes.

This PR should be approved before the above PR is merged. After ipfs/go-datastore#140 is merged then this PR should have its go.mod updated and merged.

return ErrClosed
}

return nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this the approach we want here? I see that FlatFS has support for both sync and async operation (async seems to be the default, but IPFS uses the sync version by default).

Do we want to support some sort of sync here in the event that the datastore is running in async mode? If so is it important enough to do something now or should I just file an issue?

Copy link
Member

Choose a reason for hiding this comment

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

Let's file an issue and leave this as-is for now.

A correct implementation would need to call fsync on all changed files. Doing so would require keeping track of file changes (or relying on timestamps).

return ErrClosed
}

return nil
Copy link
Member

Choose a reason for hiding this comment

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

Let's file an issue and leave this as-is for now.

A correct implementation would need to call fsync on all changed files. Doing so would require keeping track of file changes (or relying on timestamps).

@Stebalien Stebalien marked this pull request as ready for review December 3, 2019 15:04
@Stebalien Stebalien merged commit b336dbc into master Dec 3, 2019
@Stebalien Stebalien deleted the feat/ds-update branch December 3, 2019 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants