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

Durability issue with on-disk storage mode #1799

Closed
DavIvek opened this issue Mar 8, 2024 · 2 comments · Fixed by #1811
Closed

Durability issue with on-disk storage mode #1799

DavIvek opened this issue Mar 8, 2024 · 2 comments · Fixed by #1811
Assignees
Labels

Comments

@DavIvek
Copy link
Contributor

DavIvek commented Mar 8, 2024

Memgraph version
2.15

Describe the bug
Wrong results when while matching all nodes in database, using on-disk storage mode.
Screenshot from 2024-03-08 14-39-00

NOTE: This data existed in database before restart

@DavIvek DavIvek self-assigned this Mar 11, 2024
@DavIvek
Copy link
Contributor Author

DavIvek commented Mar 11, 2024

The problem is that Memgraph saves the current timestamp only in DiskStorage destructor, but if process gets killed with SIGKILL signal, for example, then destructor won't be called and the timestamp won't be saved.
Because of that, timestamp will start from 1 and old keys will be used, hence user will have to query the database until he gets to the timestamp he used before database was restarted.
To fix this, we should either save every commit timestamp after the transaction finishes, or we could add a flag that will save the timestamp after n commits.

@DavIvek DavIvek changed the title Wrong results using on-disk storage mode. Durability issue with on-disk storage mode Mar 11, 2024
@DavIvek
Copy link
Contributor Author

DavIvek commented Mar 11, 2024

An additional issue related to this one, the --data-recovery-on-startup flag doesn't do anything in on-disk storage mode. By default, Memgraph is treating it as always true. We should either handle the case where it is set to false (by deleting rocksdb data dirs) or we should write somewhere in docs, that if the user doesn't want to recover data on startup, he should delete rocksdb data dirs manually.

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

Successfully merging a pull request may close this issue.

1 participant