-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Support opening the database in exclusive mode #6714
Comments
@shekhirin , does this imply that once resolved, it would be feasible to host the database file on NFS to support multiple readers alongside a single node writing to it? Can i take this? |
I believe the read from many, write from one works but there are some caveats attaching info from reth: Ok, So i patched in exclusive and accede flags when the db is openned and was able to open the DB from the NFS(R/W) mount and everything is working properly there |
applogies, i was fat fingering a path when i was getting error 30 here
using the correct path
and then using the symlink
|
Problem
Now, if you try to open a database file located in a remote filesystem such as NFS, it will fail with error 15:
Error 15 maps into
ENOTBLK
GNU kernel error, which MDBX re-uses asMDBX_EREMOTE
reth/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h
Line 1969 in a554c1f
And returns in cases when remote filesystem is being accessed with no MDBX_EXCLUSIVE set https://github.com/paradigmxyz/reth/blob/a554c1fbf889af0087093a28b9efe93917f51004/crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c#L31925-L31933
Solution
We have the
exclusive
flag inside our Rust structreth/crates/storage/libmdbx-rs/src/flags.rs
Lines 152 to 154 in a554c1f
DatabaseArguments
reth/crates/storage/db/src/implementation/mdbx/mod.rs
Lines 59 to 66 in a554c1f
reth/crates/storage/db/src/implementation/mdbx/mod.rs
Lines 244 to 251 in a554c1f
The text was updated successfully, but these errors were encountered: