berkeley_db.c: improvements to transactional data store
authorArt Cancro <ajc@citadel.org>
Sat, 26 Aug 2023 23:19:54 +0000 (19:19 -0400)
committerArt Cancro <ajc@citadel.org>
Sat, 26 Aug 2023 23:19:54 +0000 (19:19 -0400)
commit172510e26dae0a67606e699ae20735ad1965195a
treef86f15d3aa61c4fb0a3c534f597f8fa5991b8e0c
parent38fd1144349dc8b6c5925961ef083c0d74972dd8
berkeley_db.c: improvements to transactional data store

https://docs.oracle.com/cd/E17276_01/html/programmer_reference/transapp_env_open.html

The use of the DB_RECOVER flag to dbenv->open() appears to do more than just try to
recover the environment upon startup.  It also creates __db.00X files, which are
perhaps holding the environment???   In any case it seems to be more solid this way.
I am also removing the use of any "private" transactions, since they are no longer
needed.  Operations which write to the database check to see if the thread's dedicated
transaction pointer is in effect, maintaining that transaction if it is, and creating
a transaction in the same pointer otherwise.

There is a "double free" bug somewhere in here and I'm still trying to figure out what
conditions cause it to happen.
citadel/server/backends/berkeley_db/berkeley_db.c
citadel/server/modules/expire/serv_expire.c
citadel/server/modules/fulltext/serv_fulltext.c
citadel/server/msgbase.c