]> git.sur5r.net Git - openldap/blob - servers/slapd/back-bdb2/txn.h
Merge in all devel changes since 2.0-alpha2.
[openldap] / servers / slapd / back-bdb2 / txn.h
1 /* txn.h - Header for TP support functions of the bdb2 backend */
2 /* $OpenLDAP$ */
3
4 #ifndef _BDB2_TXN_H_
5 #define _BDB2_TXN_H_
6
7 #include "portable.h"
8
9 #include <stdio.h>
10 #include <sys/stat.h>
11
12 #include <ac/dirent.h>
13 #include <ac/errno.h>
14 #include <ac/signal.h>
15 #include <ac/socket.h>
16 #include <ac/string.h>
17 #include <ac/time.h>
18 #include <ac/unistd.h>
19
20 #include "slap.h"
21 #include "back-bdb2.h"
22
23
24
25 /*  the DB environment for the backend  */
26 DB_ENV                    bdb2i_dbEnv;
27
28
29 /*  variables for transaction support  */
30 DB_TXN                    *txnid       = NULL;
31 int                       txn_do_abort = 0;
32
33 u_int32_t                 txn_max_pending_log;
34 u_int32_t                 txn_max_pending_time;
35 int                       txn_dirty = 0;
36 ldap_pvt_thread_mutex_t   txn_dirty_mutex;
37
38 /*  defaults for checkpointing  */
39 #define  BDB2_TXN_CHKP_MAX_LOG     2000    /*  checkpoint every 2MB lock file
40                                                (approx. 20 ADD TXNs)  */
41 #define  BDB2_TXN_CHKP_MAX_TIME       5    /*  checkpoint after 5 minutes */
42
43
44 /*  the name of the file and the record number of the NEXTID datum  */
45 #define NEXTID_NAME    "NEXTID"
46 #define NEXTID_RECNO   (db_recno_t) 1
47
48
49
50 #endif  /*  _BDB2_TXN_H_  */
51