You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The document said, the snapshot is created at the time db.get() was called.
I thought, this means that the snapshot is latest data for this calling.
However, the document also said, it should not see the data of simultaneous write operations.
Can the data be changed after db.get() was called (and the snapshot was created) and before db.get() returns the data?
That is, I understand that an iterator might return old data because that reads lazily it, but db.get() is not. Then I thought that db.get() returns latest data before something changes it.
Or, is there a way to get latest data?
Thank you.
The text was updated successfully, but these errors were encountered:
Can the data be changed after db.get() was called (and the snapshot was created) and before db.get() returns the data?
In 1.x there is a brief window where the data can theoretically change in between the db.get() call and snapshot creation. This has been fixed in 2.0.0 (50e03dc). See Level/community#118 for background.
What this means is that db.get() is guaranteed to return the last data that was successfully written by your app prior to the db.get() call. It's the app's responsibility to await any prior write operations, if that data should be included in the snapshot.
Hi, thank you for the great library.
I have a question about the document for snapshot with
db.get()
.https://github.com/Level/classic-level#dbgetkey-options-callback
The document said, the snapshot is created at the time
db.get()
was called.I thought, this means that the snapshot is latest data for this calling.
However, the document also said, it should not see the data of simultaneous write operations.
Can the data be changed after
db.get()
was called (and the snapshot was created) and beforedb.get()
returns the data?That is, I understand that an
iterator
might return old data because that reads lazily it, butdb.get()
is not. Then I thought thatdb.get()
returns latest data before something changes it.Or, is there a way to get latest data?
Thank you.
The text was updated successfully, but these errors were encountered: