Berkeley DB Reference Guide: Upgrading Berkeley DB Applications
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++

### Berkeley DB Reference Guide: Upgrading Berkeley DB Applications |

# Release 3.0: DB->sync and DB->close

In previous Berkeley DB releases, the DB->close and DB->sync functions discarded any return of DB_INCOMPLETE from the underlying buffer pool interfaces, and returned success to its caller. (The DB_INCOMPLETE error will be returned if the buffer pool functions are unable to flush all of the database's dirty blocks from the pool. This often happens if another thread is reading or writing the database's pages in the pool.)

In the 3.X release, DB->sync and DB->close will return DB_INCOMPLETE to the application. The best solution is to not call DB->sync and specify the DB_NOSYNC flag to the DB->close function when multiple threads are expected to be accessing the database. Alternatively, the caller can ignore any error return of DB_INCOMPLETE.

Copyright Sleepycat Software