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