[odb-users] Application cannot terminate (hangs) if transaction with make_current = false not committed nor rolled back

Javier Gutierrez javier.gutierrez at web.de
Wed Mar 14 18:36:48 EDT 2018


Hi there,

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.

As workaround for now I am recording in a vector all transactions 
created inside my transaction factory, and in the destructor, finalize 
all of them which have not yet been finalized. This seems anyhow a bit 
cumbersome, and worse I have not control on transactions created by the 
user outside the factory.

So my question is if there is a way to finalize all these inactive 
transactions directly from ODB..

Thanks in advance,

Javier



More information about the odb-users mailing list