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

feat(storage): MDBX exclusive mode #6755

Merged
merged 8 commits into from
Feb 28, 2024

Conversation

loocapro
Copy link
Contributor

@loocapro loocapro commented Feb 23, 2024

Closes #6714

Hi @shekhirin ,

Does this mean it could be feasible to host the database file on NFS to support multiple readers alongside a single node writing to it?

crates/storage/db/src/implementation/mdbx/mod.rs Outdated Show resolved Hide resolved
crates/storage/libmdbx-rs/src/environment.rs Outdated Show resolved Hide resolved
crates/storage/db/src/implementation/mdbx/mod.rs Outdated Show resolved Hide resolved
@shekhirin
Copy link
Collaborator

Does this mean it could be feasible to host the database file on NFS to support multiple readers alongside a single node writing to it?

Unfortunately, AFAIK – no. It will allow you to have read-write access to the database on a network-attached drive, but only from one process. To my knowledge, MDBX doesn't support both writers and readers on a network-attached drive. Multiple readers can be done via a read-only mode on a read-only filesystem though.

Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@shekhirin shekhirin added C-enhancement New feature or request A-db Related to the database labels Feb 28, 2024
@shekhirin shekhirin added this pull request to the merge queue Feb 28, 2024
@shekhirin shekhirin changed the title Db exclusive mode feat(storage): MDBX exclusive mode Feb 28, 2024
Merged via the queue into paradigmxyz:main with commit 5475a12 Feb 28, 2024
29 checks passed
fgimenez pushed a commit to fgimenez/reth that referenced this pull request Feb 29, 2024
argakiig added a commit to argakiig/reth that referenced this pull request Mar 26, 2024
the purpose of this is to further extend paradigmxyz#6755 and allow for `--db.exclusive=true` to be used to support nfs volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support opening the database in exclusive mode
2 participants