1 *** dbinc_auto/int_def.in 2002/09/03 17:27:19 1.70
2 --- dbinc_auto/int_def.in 2002/09/18 19:01:43
6 #define __txn_force_abort __txn_force_abort@DB_VERSION_UNIQUE_NAME@
7 #define __txn_preclose __txn_preclose@DB_VERSION_UNIQUE_NAME@
8 #define __txn_reset __txn_reset@DB_VERSION_UNIQUE_NAME@
9 + #define __txn_updateckp __txn_updateckp@DB_VERSION_UNIQUE_NAME@
10 #define __txn_regop_log __txn_regop_log@DB_VERSION_UNIQUE_NAME@
11 #define __txn_regop_getpgnos __txn_regop_getpgnos@DB_VERSION_UNIQUE_NAME@
12 #define __txn_regop_print __txn_regop_print@DB_VERSION_UNIQUE_NAME@
13 *** dbinc_auto/txn_ext.h 2002/09/03 17:27:20 1.32
14 --- dbinc_auto/txn_ext.h 2002/09/18 19:01:43
18 int __txn_force_abort __P((DB_ENV *, u_int8_t *));
19 int __txn_preclose __P((DB_ENV *));
20 int __txn_reset __P((DB_ENV *));
21 + void __txn_updateckp __P((DB_ENV *, DB_LSN *));
22 int __txn_regop_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, int32_t));
23 int __txn_regop_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
24 int __txn_regop_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
25 *** rep/rep_record.c 2002/09/11 19:39:11 1.111
26 --- rep/rep_record.c 2002/09/18 19:01:58
30 * replica get flushed now and again.
32 ret = dbenv->log_flush(dbenv, &ckp_lsn);
33 + /* Update the last_ckp in the txn region. */
35 + __txn_updateckp(dbenv, &rp->lsn);
38 if (!F_ISSET(dbenv, DB_ENV_REP_LOGSONLY))
39 *** txn/txn.c 2002/08/29 17:41:17 11.179
40 --- txn/txn.c 2002/09/18 19:02:05
47 ! * We want to make sure last_ckp only moves forward; since
48 ! * we drop locks above and in log_put, it's possible
49 ! * for two calls to __txn_ckp_log to finish in a different
50 ! * order from how they were called.
52 ! R_LOCK(dbenv, &mgr->reginfo);
53 ! if (log_compare(®ion->last_ckp, &ckp_lsn) < 0) {
54 ! region->last_ckp = ckp_lsn;
55 ! (void)time(®ion->time_ckp);
57 ! R_UNLOCK(dbenv, &mgr->reginfo);
65 ! __txn_updateckp(dbenv, &ckp_lsn);
72 DB_ASSERT(LOGGING_ON(dbenv));
73 return (__txn_recycle_log(dbenv,
74 NULL, &scrap, 0, TXN_MINIMUM, TXN_MAXIMUM));
78 + * __txn_updateckp --
79 + * Update the last_ckp field in the transaction region. This happens
80 + * at the end of a normal checkpoint and also when a replication client
81 + * receives a checkpoint record.
83 + * PUBLIC: void __txn_updateckp __P((DB_ENV *, DB_LSN *));
86 + __txn_updateckp(dbenv, lsnp)
91 + DB_TXNREGION *region;
93 + mgr = dbenv->tx_handle;
94 + region = mgr->reginfo.primary;
97 + * We want to make sure last_ckp only moves forward; since
98 + * we drop locks above and in log_put, it's possible
99 + * for two calls to __txn_ckp_log to finish in a different
100 + * order from how they were called.
102 + R_LOCK(dbenv, &mgr->reginfo);
103 + if (log_compare(®ion->last_ckp, lsnp) < 0) {
104 + region->last_ckp = *lsnp;
105 + (void)time(®ion->time_ckp);
107 + R_UNLOCK(dbenv, &mgr->reginfo);