Library Version 12.1.6.2

log_XXX
Prev | Chapter 10. Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0 | Next

## log_XXX

The C API for the Berkeley DB Logging subsystem was reworked in the 4.0 release as follows:

Historic functional interface | Berkeley DB 4.X method
--- | ---
log_archive | DB_ENV->log_archive()
log_file | DB_ENV->log_file()
log_flush | DB_ENV->log_flush()
log_get | DB_ENV->log_cursor()
log_put | DB_ENV->log_put()
log_register | DB_ENV->log_register
log_stat | DB_ENV->log_stat()
log_unregister | DB_ENV->log_unregister

Applications calling any of these functions should update their calls to use the enclosing DB_ENV class handle's method (in all cases other than the log_get call, this is easily done as the first argument to the existing call is the correct handle to use).

Application calls to the historic log_get function must be replaced with the creation of a log file cursor (a DB_LOGC class object), using the DB_ENV->log_cursor() method to retrieve log records and calls to the DB_LOGC->close() method to destroy the cursor. It may also be possible to simplify some applications. In previous releases of Berkeley DB, the DB_CURRENT, DB_NEXT, and DB_PREV flags to the log_get function could not be used by a free-threaded DB_ENV class handle. If their DB_ENV class handle was free-threaded, applications had to create an additional, unique environment handle by separately calling DB_ENV->open(). This is no longer an issue in the log cursor interface, and applications may be able to remove the now unnecessary creation of the additional DB_ENV class object.

Finally, the DB_ENV->log_stat() call has been changed in the 4.0 release to take a flags argument. To leave their historic behavior unchanged, applications should add a final argument of 0 to any calls made to DB_ENV->log_stat().

Prev | Up | Next
lock_XXX | Home | memp_XXX