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

expose mdb_env_set_flags() #202

Closed
mikedilger opened this issue Aug 7, 2023 · 4 comments
Closed

expose mdb_env_set_flags() #202

mikedilger opened this issue Aug 7, 2023 · 4 comments

Comments

@mikedilger
Copy link

mikedilger commented Aug 7, 2023

During migrations, I want to set NO_SYNC | NO_META_SYNC.
(yes I try to do it as one transaction anyways)

@Kerollmops
Copy link
Member

Isn't the EnvOpenOptions::flag method not enough? It is available on the 0.20.0-alpha versions.

@mikedilger
Copy link
Author

mikedilger commented Aug 8, 2023

So do I open a separate env? And can I do that while I still have another env already open (I open the env originally in a lazy static)? and then it seems I'd have to open all the database again too. Lots of calls to use EnvOpenOptions.

@Kerollmops
Copy link
Member

Could you describe what you would like to do? If I had to open an env with specific options, I would use the EnvOpenOptions to set up the flags and use it the whole program. Are you trying to change the environment options when the env is already opened? If so, you could close it with the Env::prepare_for_closing method and reopen it afterward.

@mikedilger
Copy link
Author

I'm no longer doing this. I was opening it without these options and syncing every transaction, then during certain sequences I wanted it to not sync every transaction. Now I'm manually handling the syncing.

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