June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int memp_sync(DB_ENV *env, DB_LSN *lsn);
The memp_sync function 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 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 memp_sync function and then, if ...