June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db_cxx.h> int DbEnv::memp_sync(DbLsn *lsn);
The DbEnv::memp_sync method ensures that any modified pages in the pool with log sequence numbers less than the lsn argument are written to disk. If lsn is NULL, all modified pages in the pool are flushed.
The primary purpose of the DbEnv::memp_sync function is to enable a transaction manager to ensure, as part of a checkpoint, that all pages modified by a certain time have been written to disk. Pages in the pool that cannot be written back to disk immediately (for example, that are currently pinned) are written to disk as soon as it is possible to do so. The expected behavior of the Berkeley DB or other transaction subsystem is to call the DbEnv::memp_sync ...