[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-bugs
Subject:    Re: (ITS#7517) mdb_dbi_close(dbi updated in existing txn) breaks
From:       h.b.furuseth () usit ! uio ! no
Date:       2013-02-20 6:56:50
Message-ID: 201302200656.r1K6uoJ3031820 () boole ! openldap ! org
[Download RAW message or body]

> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic