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

In extreme cases, querying based on id results in empty query results. #277

Open
zhangziqiang1 opened this issue Jan 22, 2022 · 1 comment

Comments

@zhangziqiang1
Copy link

public Node nodeById(long id) {

public synchronized void add(Node node) {

If there are two threads, one is writing the database and the other is reading the database via id.
Then the reading thread can't observe the result of the writing thread.
@mpollmeier

@mpollmeier
Copy link
Contributor

Yes, that's what I would expect. There's currently no measures of any kind in place to guarantee read/write consistency and atomicity. Almost everything is optimized for fast reads.

We're working on a new storage engine which will be a bit more explicit about all this, and we will then also document these properties. The storage engine will be even more optimized for reads, but probably with better consistency constraints.

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

2 participants