[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#7517) mdb_dbi_close(dbi updated in existing txn) breaks
> If a thread modifies a named MDB database and closes it before
> committing, the changes are lost.
Documented "don't do that".
mdb_dbi_close() could defer fully closing the DBI to the current write
transaction if one exists. But that would require a mutex locked by
[I think] mdb_env_commit(write txn), mdb_dbi_open, and mdb_dbi_close.
> Test case (no nested txns):
Bogus test program. The mdb_dbi_open() should use a named database:
> E(mdb_dbi_open(txn, NULL, rdonly ? 0 : MDB_CREATE, &dbi));
E(mdb_dbi_open(txn, "db", rdonly ? 0 : MDB_CREATE, &dbi));
--
Hallvard