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

mdb_env_close obliterates unrelated readers #66

Closed
dw opened this issue May 13, 2014 · 0 comments
Closed

mdb_env_close obliterates unrelated readers #66

dw opened this issue May 13, 2014 · 0 comments

Comments

@dw
Copy link
Collaborator

dw commented May 13, 2014

erp, seems mdb_env_close() with MDB_NOTLS isn't quite ideal yet

since readers aren't tracked in MDB_env, it just blasts everything in the reader table with the same PID

there shouldn't be any occasion where the same process has the environment opened twice, but it seems there is also no way to detect and prevent this condition..

without opening and closing the environment in order to call _readers() (the close, of course, will obliterate the already existing environment even if we manage to
throw an exception)

not sure if it is necessarily a bug. maybe mdb_env_open() should grow a new MDB_ALREADY_OPEN or something error

i can completely work around it in the binding by fstat() and compare inodes with internal list of existing envs prior to mdb_env_open()

dw added a commit that referenced this issue May 13, 2014
First alternative to fixing the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants