int i;
int ret;
+ static int closing = 0;
+ while (closing == 1) {
+ syslog(LOG_INFO, "db: already closing");
+ }
+ closing = 1;
+
syslog(LOG_INFO, "db: performing final checkpoint");
if ((ret = dbenv->txn_checkpoint(dbenv, 0, 0, 0))) {
syslog(LOG_ERR, "db: txn_checkpoint: %s", db_strerror(ret));
if (ret) {
syslog(LOG_ERR, "db: db_close: %s", db_strerror(ret));
}
-
}
- // This seemed nifty at the time but did anyone really look at it?
- // #ifdef DB_STAT_ALL
- // dbenv->lock_stat_print(dbenv, DB_STAT_ALL);
- // #endif
-
// Close the handle.
- ret = dbenv->close(dbenv, 0);
+ ret = dbenv->close(dbenv, DB_FORCESYNC);
if (ret) {
syslog(LOG_ERR, "db: DBENV->close: %s", db_strerror(ret));
}