Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When snapshot is created with db.get() #23

Open
anseki opened this issue Apr 7, 2022 · 0 comments
Open

When snapshot is created with db.get() #23

anseki opened this issue Apr 7, 2022 · 0 comments

Comments

@anseki
Copy link

anseki commented Apr 7, 2022

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant