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

Read-only database opening does not work on a read-only context #176

Merged
merged 1 commit into from
Jul 12, 2023

Commits on Jul 12, 2023

  1. Reintroduce RoTxn::commit: fix database opening read-only database.

    Opening of databases with Env::open_database() without previous Env in memory
    with a RoTxn lead to the following error:
    `Io(Os { code: 22, kind: InvalidInput, message: "Invalid argument" })`
    
    It's due to the fact that RoTxn are not commited so the env->me_numdbs cannot be
    updated and will be set to CORE_DB so 2.
    
    It can trigger from multi-process setup, read-only opening, closing write
    access, and re-opening from the same process.
    
    Thanks to @Kerollmops for the typo and review.
    
    Co-authored-by: Clément Renault <renault.cle@gmail.com>
    2 people authored and darnuria committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    e035849 View commit details
    Browse the repository at this point in the history