[Date Prev][Date Next] [Chronological] [Thread] [Top]

Checkpoint command not working in slapd.conf?



OpenLDAP 2.2.17 on FreeBSD 4.10-STABLE (compiled from ports).

I know it's not the latest, but using 2.2.19 is not an option right now. 
because it wants a new OpenSSL etc, which will cause "issues".

Having been bitten by not detecting a corrupt (test) database, I figured I 
may as well set things up properly, including checkpointing.

Extract from slapd.conf:

database        bdb
include         /usr/local/etc/openldap/master.acl
suffix          "dc=au,dc=company,dc=com"
rootdn          XXX
rootpw          XXX
checkpoint      1024 5	<<<----------------------------

directory       /usr/local/openldap-data/au
cachesize       2000

I understand that this means to checkpoint if updates have been performed 
since 1024kb or 5 minutes after the last checkpoint (and I assume this 
includes since the DB was started, as otherwise it would never checkpoint 
at all).

DB_CONFIG:
#
# Size of internal cache; the format is Gb + b, no. caches.
# 4Mb is plenty for our relatively teensy directories.
#
set_cachesize   0 4194304 1

So, I make a trivial update, observe that the "__db" files and log have 
been updated, and twiddle my thumbs for 5 minutes.  Nope.  After 10 
minutes, I force a checkpoint with "db_checkpoint".

I do it again, just to be sure.  Below, you can see the forced checkpoint 
at 10:17, and the second update at 10:19.

guido:/var/db/openldap-data/au [30]# ls -lt
total 8188
-rw-------  1 ldap  ldap   368640 Jan 18 10:19 __db.004
-rw-------  1 ldap  ldap  5251072 Jan 18 10:19 __db.002
-rw-------  1 ldap  ldap    98304 Jan 18 10:19 __db.003
-rw-------  1 ldap  ldap    24576 Jan 18 10:19 __db.005
-rw-------  1 ldap  ldap     8192 Jan 18 10:19 __db.001
-rw-------  1 ldap  ldap  5539588 Jan 18 10:19 log.0000000001
-rw-------  1 ldap  ldap  1392640 Jan 18 10:17 id2entry.bdb
-rw-------  1 ldap  ldap   327680 Jan 18 09:56 dn2id.bdb
-rw-------  1 ldap  ldap   110592 Jan 17 13:51 objectClass.bdb
-rw-------  1 ldap  ldap    24576 Jan 15 16:50 uid.bdb
-rw-------  1 ldap  ldap    36864 Nov 19 12:34 cn.bdb
-rw-------  1 ldap  ldap    24576 Nov 18 15:00 employeeNumber.bdb
-rw-------  1 ldap  ldap    28672 Nov 18 15:00 sn.bdb
-rw-------  1 ldap  ldap     8192 Nov 18 15:00 ciHost.bdb
-rw-------  1 ldap  ldap    40960 Nov 18 15:00 ciApp.bdb
lrwxrwxr-x  1 root  ldap       12 Oct 27 15:36 DB_CONFIG@ -> ../DB_CONFIG
guido:/var/db/openldap-data/au [30]# date
Tue Jan 18 10:59:17 EST 2005

Yep; 40 minutes later, and it still hasn't checkpointed...  Googling 
around turned up nothing relevant, and I even checked the back-bdb sources 
to make sure the option was being picked up (it was) and txn_checkpoint() 
being called after an update (it was).

What dumb thing have I done (or not done)?

-- 
Dave Horsfall  DTM  VK2KFU  daveh@ci.com.au  Ph: +61 2 8425-5508 (d) -5500 (sw)
Corinthian Engineering, Level 1, 401 Pacific Hwy, Artarmon, NSW 2064, Australia