-
Notifications
You must be signed in to change notification settings - Fork 36
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 bit when opening file for writing #625
Comments
did this happen with the hdf5 backend?! This should be capable of parallel access from multiple processes. |
This happened with the old (pre pycore) version of nixpy. |
Hi Jan We were using a nix file that was on machine A which was also mounted on machine B using sshfs over the local network. A process on machine A opened and started writing into the nix file. Before it finished writing and closed the nix file, a process on machine B opened and started writing into the mounted nix file. Both processes finished without error. However, in the resulting nix file, a section that was written into by both the processes could no longer be opened (RuntimeError:...checksum failed...). The same error was seen both when using nix-view and nixio to access the section. What do you think happened there? Was it a nix issue or a sshfs issue? Thanks. Sincerely |
ok, actually the hdf5 lib can do it if a certain flag is set. https://hdfgroup.org/wp/2015/04/parallel-io-why-how-and-where-to-hdf5/ |
It might be a nice idea to have a lock attribute set on the file when it is open for writing, to protect against multiple instances writing to a file simultaneously.
This would protect against accidentally running two processes that write to the same file, which can cause corruption (this just happened), or even against two different people writing to the same file on a remote machine (on a common network share, for instance).
What do you think?
The text was updated successfully, but these errors were encountered: