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:
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.
We don't set the LevelDB snapshot option for
database_->Get()
, so rather than reading from a snapshot created at the time thatdb.get()
was called, it will read from an implicit snapshot (i.e. latest state) at the time the async worker runs:https://github.com/Level/leveldown/blob/bd33f6fef9009643659bb2f65c825df3c758c1e9/binding.cc#L1123
For comparison, see
db.getMany()
where we do set the snapshot option:https://github.com/Level/leveldown/blob/bd33f6fef9009643659bb2f65c825df3c758c1e9/binding.cc#L1173
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.