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

Introduce better support to acquire global database handles #154

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Jan 12, 2023

Fixes the first point of #144 which is:

The database handle will be private to the current transaction until the transaction is successfully committed. If the transaction is aborted the handle will be closed automatically. After a successful commit the handle will reside in the shared environment, and may be used by other transactions.

About the second point below, we should only allow write transactions to create or open databases. It would be valid to open all the available databases at the first env opening, they are listed in the main database (name = NULL), and these names can be mixed with data. The issue is that heed is a typed key-value store, we must ask the user for the type of a database, maybe with a function given to the EnvOpenOptions.

[mdb_dbi_open] must not be called from multiple concurrent transactions in the same process. A transaction that uses this function must finish (either commit or abort) before any other transaction in the process may use this function.

@Kerollmops Kerollmops added bug Something isn't working enhancement New feature or request labels Jan 12, 2023
@Kerollmops Kerollmops added this to the v0.20.0 milestone Jan 12, 2023
@Kerollmops Kerollmops force-pushed the safer-database-opening branch from 03c06a6 to 255e88c Compare April 8, 2023 14:11
@Kerollmops Kerollmops force-pushed the safer-database-opening branch from 255e88c to 59bbbc6 Compare April 8, 2023 16:19
@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
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant