Skip to content

Support Asynchronous Writing #38

@aschmahmann

Description

@aschmahmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions