X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb2%2Ftxn.h;h=1068f238e9258bb2086eb90759834676c88911c5;hb=4b65e74fa8ee7db3c42f4640700dd9464a26b0b3;hp=d701dd555340e35b8064c103da8fe6827b649436;hpb=c2b7c9e2dba8764d5aab54ee8bbce52eaea81dbf;p=openldap diff --git a/servers/slapd/back-bdb2/txn.h b/servers/slapd/back-bdb2/txn.h index d701dd5553..1068f238e9 100644 --- a/servers/slapd/back-bdb2/txn.h +++ b/servers/slapd/back-bdb2/txn.h @@ -22,12 +22,31 @@ -#define BDB2_TXN_CHKP_MAX_CNT 20 /* checkpoint every - 20 transactions */ -#define BDB2_TXN_CHKP_MAX_TIME 600 /* checkpoint after - 600 seconds */ +/* the DB environment for the backend */ +DB_ENV bdb2i_dbEnv; +/* variables for transaction support */ +DB_TXN *txnid = NULL; +int txn_do_abort = 0; + +u_int32_t txn_max_pending_log; +u_int32_t txn_max_pending_time; +int txn_dirty = 0; +ldap_pvt_thread_mutex_t txn_dirty_mutex; + +/* defaults for checkpointing */ +#define BDB2_TXN_CHKP_MAX_LOG 2000 /* checkpoint every 2MB lock file + (approx. 20 ADD TXNs) */ +#define BDB2_TXN_CHKP_MAX_TIME 5 /* checkpoint after 5 minutes */ + + +/* the name of the file and the record number of the NEXTID datum */ +#define NEXTID_NAME "NEXTID" +#define NEXTID_RECNO (db_recno_t) 1 + + +/* default DB files */ char *bdb2i_fixed_filenames[] = { "dn", "dn2id", "id2entry", "id2children", "objectclass"