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

Support Asynchronous Writing #38

Open
aschmahmann opened this issue Dec 2, 2019 · 0 comments
Open

Support Asynchronous Writing #38

aschmahmann opened this issue Dec 2, 2019 · 0 comments

Comments

@aschmahmann
Copy link
Contributor

LevelDB internally supports both synchronous and asynchronous datastore writes (via the WriteOptions struct). However, to support our Datastore interface's definition of an asynchronous datastore we need to support the Sync(prefix ds.Key) function which syncs to disk, at least, all keys hierarchically under prefix.

As goleveldb only supports syncing the database during writes, and not at an arbitrary time, we haven't yet implemented this. While we could try to work around this limitation by synchronously writing to some preset key (as mentioned in #36 (comment)), it would be much cleaner and would have less edge cases if a Sync function were exposed by goleveldb.

If something like syndtr/goleveldb#310 was to be merged this would be a very straightforward fix.

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

No branches or pull requests

1 participant