h.b.furuseth@usit.uio.no wrote:
Related doc bug:
I expect it should be "only one thread at a time". I doubt it's about pinning some operation to a particular thread:-)
Wrong.
For write txns I suppose that could be relaxed. For readers, the reader slot is set when the txn is created, and that slot is owned by a particular thread.
However, maybe it should rather be something like "No other transaction doing mdb_open() may exist at the same time, nor a write transaction (since that also updates the databases), nor may such a transaction exist during mdb_close()" ?
I note mdb_drop() also updates the databases and can likely not coexist with the others, but that's covered by mentioning write txns.
Regarding mdb_drop(), while I'm at it: @brief Delete a database and/or free all its pages. @param[in] del non-zero to delete the DB from the environment, otherwise just free its pages. Free which pages? In the DB, or some malloced ones?
This is single-level-store, there is no distinction. In the DB or in memory, all the same.