O'Reilly logo

Berkeley DB by Sleepycat™ Software, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Application Structure

When building transactionally protected applications, there are some special issues that must be considered. The most important one is that if any thread of control exits for any reason while holding Berkeley DB resources, recovery must be performed to do the following:

  • Recover the Berkeley DB resources.

  • Release any locks or mutexes that may have been held to avoid starvation as the remaining threads of control convoy behind the failed thread’s locks.

  • Clean up any partially completed operations that may have left a database in an inconsistent or corrupted state.

Complicating this problem is the fact that the Berkeley DB library itself cannot determine whether recovery is required; the application itself must make that decision. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required