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

Checking for already opened LMDB Environments #180

Open
2 of 5 tasks
darnuria opened this issue Jul 10, 2023 · 1 comment · May be fixed by #179
Open
2 of 5 tasks

Checking for already opened LMDB Environments #180

darnuria opened this issue Jul 10, 2023 · 1 comment · May be fixed by #179
Labels
enhancement New feature or request
Milestone

Comments

@darnuria
Copy link
Contributor

darnuria commented Jul 10, 2023

Heed strive to pursue opening LMDB safely, so a database environment must be opened only once inside a process address space.

Any subsequent opening shall return the corresponding already opened environment.

It was done with Path Canonization but it fails to tackle symlinks, hardlinks and renaming/move of the whole database environment (both locks and database).

In an ideal world the environment already open checking must prevail:

Related pull requests/ Issue

Open question

Is Canonization still pertinant if we check already-openned by Unix: (device/inode) Windows: (Driver/fileID) through same_file?

How to do it compatible with windows without lefting file open.

Problems

Lmdb rely on Unixes on posix filelocking through fnctl

@Kerollmops Kerollmops added this to the v0.20.0 milestone Jul 10, 2023
@Kerollmops Kerollmops added the enhancement New feature or request label Jul 10, 2023
@Kerollmops Kerollmops changed the title Checking for LMDB Environnements already opened Checking for already opened LMDB Environments Jul 10, 2023
@darnuria
Copy link
Contributor Author

@Kerollmops would suggest removing from 0.20.0 this issue the solution may cause more trouble than the initial issue.

@Kerollmops Kerollmops modified the milestones: v0.20.0, v0.21.0 Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants