-
Notifications
You must be signed in to change notification settings - Fork 42
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
Lock for single process restriction #98
Comments
I'd like to take it :) |
Hi @ethe , a silly question as I'm new to the project as well. Should this locking mechanism be implemented in https://github.com/tonbo-io/fusio ? And will the lock prevent both read & write operations from multiple processes? Or only writes will be locked? |
Hi @PhVHoang , I think it is different level behavior. Linux file system allows access a single file across multiple process, |
The locks between multiple processes are often fslock, which should depend on the underlying implementation of each system such as |
I was misunderstanding, I get it now, considering the target of fusio, I think fusio might not provide a lock abstraction, because fs lock does not make sense to other fs implementation than local fs. Just use std fs lock (or libc) should be fine. |
It is a question whether |
It depends on target OS, I think in the most of cases it is guaranteed, OPFS does not support parallel read write on default. |
Currently, Tonbo only supports single-process read and write operations. Accessing the database file from multiple processes can lead to undefined behavior. However, Tonbo does not prevent this. Therefore, Tonbo should implement a mechanism to lock access to the database files.
The text was updated successfully, but these errors were encountered: