[odb-users] Application cannot terminate (hangs) if transaction
with make_current = false not committed nor rolled back
Boris Kolpackov
boris at codesynthesis.com
Fri Mar 16 11:13:54 EDT 2018
Javier Gutierrez <javier.gutierrez at web.de> writes:
> this time a question from my side :) I am having a problem when I create a
> transaction with the make_current flag = false. When my application needs to
> terminate (e.g. due to an exception) and the transaction was no finalized
> (e.g. neither committed nor rolled back), then my application hangs. The
> hanging is due to a locked condition_variable in the ODB database library.
I don't believe this has anything to do with make_current but with
the fact that you are not destroying the transaction object. Such a
transaction is still holding on to a database connection which blocks
the connection pool destruction.
Generally (and naturally), you should have all the transaction objects
destroyed before attempting to destroy the database.
Boris
More information about the odb-users
mailing list