Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

db.get() doesn't read from a snapshot #796

@vweevers

Description

@vweevers

We don't set the LevelDB snapshot option for database_->Get(), so rather than reading from a snapshot created at the time that db.get() was called, it will read from an implicit snapshot (i.e. latest state) at the time the async worker runs:

SetStatus(database_->Get(options_, key_, value_));

For comparison, see db.getMany() where we do set the snapshot option:

options_.snapshot = database->NewSnapshot();

This may have been the case for a long time and I've personally not found this to be a problem in real-world apps. Putting this in the backlog until there are upvotes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions