I'm using the C++ BerkeleyDB API for an application.
Imagine that I open a new environment, start a new transaction, write something to the database using the transaction, and then kill the application before the transaction has been committed.
When I then re-open the database, any writes to the database will hang indefinitely, likely because there is a previous unfinished transaction. Opening the environment using the recovery flag solved the issue. How can I check if there are any of these unfinished transactions in order to know when to open the environment using the recovery flag?