I have recently taken over development of an app which uses Berkley DB
for the underlying data storage (recno style, C++ API). The DB is hidden
behind an iterator interface that maintains a cursor into the DB
internally. Most of the data access through the iterator interface is
read-only, but in some cases data is written through the iterator.
Problems arise when multiple iterators, and thereby multiple cursors,
are open at the same time. Under some (obscure) conditions, the app
deadlocks. As I understand it, this is a common problem when having
multiple handles into a DB at the same time. The app does not (not yet
anyway...) use transactions.
My question: what would be the simplest, most hassle-free way for me to
enable having multiple cursors/handles open without going into deadlock?
As I'm a BDB newbie, I find the answer a bit hard to find out from the
docs and I'd appreciate any suggestions.