`db.get()` doesn't read from a snapshot
vweevers opened this issue · comments
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:
Line 1123 in bd33f6f
For comparison, see db.getMany()
where we do set the snapshot option:
Line 1173 in bd33f6f
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.
Tracked in Level/community#118. It won't be fixed in leveldown
, only its successor classic-level
.