[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: back-sql caching
- To: Echedey Lorenzo <echedey@gmail.com>
- Subject: Re: back-sql caching
- From: Frederik Bosch <frederik.bosch@gmail.com>
- Date: Wed, 21 Jul 2010 15:29:18 +0200
- Cc: openldap-technical@openldap.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=VRNiiv2f2S6XvAa0wXo1K3k1KVGGvrJ6sQzHFw3PRak=; b=aFWsAKZo2i8C4nJrvs5MfNKfC9vmlS9aGo7hq2cD7Tndznd5qqDEZ8Idol1T6wBV9n dmcgCcr7ZmM6nOL+5TAH12CqmPgjEQhV0VmaUbcoI8wsVCUsvf/B4JkJRg57OubeY2JQ E1Lrleuu12+x/IvRWRg+TB7LI/APEGwavPPFU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XUrg3fzBJjZICT2j67oTrrX0D9grCoOslfVTwIOyIL7YS3+7kxKFIKAowLIziUvs+g b6+NuDwALGJFOQP6v5qIuO6ktPqj5Fuyym8yLatWCeytLJnxyIQ8f90fCL8ILNDv8pIv AAmQoIgknZD3PbvBS9YjPnAEQ71UBO0hoWyLI=
- In-reply-to: <AANLkTikPw2uRgFLsZPAZ1BBP-fWkEBi2ZB7aHTdOMJOq@mail.gmail.com>
- References: <4C442459.2070401@gmail.com> <AANLkTikPw2uRgFLsZPAZ1BBP-fWkEBi2ZB7aHTdOMJOq@mail.gmail.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11pre) Gecko/20100626 Shredder/3.0.6pre
Thanks for the suggestion. That does not seem to help. Autocommit is
turned on by default and I use InnoDB as engine for my entire database,
not MyISAM. My slapd.conf is as follows.
Regards,
Frederik
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.23.2.8 2003/05/24
23:19:14 ku
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema
#
# Allow LDAPv2 client connections. This is NOT the default.
# allow bind_v2
#
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
#
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
# Timeout in seconds, 0 = never
idletimeout 0
threads 32
# Debuging level, 0 = none
loglevel 64
#access to attrs=uid,userPassword
# by anonymous auth
# by * none
access to * by * read
#
#######################################################################
# sql database definitions
#######################################################################
database sql
suffix "o=Organisatie X"
rootdn "uid=root,o=Organisatie X"
rootpw "{CRYPT}xxxx"
dbname test
dbuser user
dbpasswd xxxx
# lastmod on
has_ldapinfo_dn_ru no
insentry_query "insert into ldap_entries (dn,oc_map_id,parent,keyval)
values (?,?,?,?)"
subtree_cond "ldap_entries.dn LIKE CONCAT('%',?,'%')"
upper_func "UPPER"
On 07/19/2010 12:22 PM, Echedey Lorenzo wrote:
Hi Frederik!
Could you try a commit; after each SQL statement?
Best Regards
2010/7/19 Frederik Bosch <frederik.bosch@gmail.com
<mailto:frederik.bosch@gmail.com>>
Hello,
With BackSQL I am trying to make my SQL data available for LDAP
purposes. Setup went OK, server starts and my data is available. I
have one problem. Modifications in the SQL data do not seem to be
executed until I restart slapd. As if the SQL data is cached.
My setup uses openldap_2.4.11-1+lenny1 which I recompiled using
debuild to enable backsql. My sqlserver is MySQL 5.0.5.
So, starting slapd won't generate any errors or problems. When I
delete or modify a row - with an other interface (directly accessing
the SQL server) then LDAP - slapd does not seem to notify the
changes. By enabling query logging for MySQL I found out that it
actually executes a new SQL statement. So the problem seems to take
place when the resultset is processed.
Inserting a new row to ldap_entries gives exactly the same problem.
It is not found until the slapd is restarted. When I started slapd
with -d 16383 I found the line <==backsql_oc_get_candidates(): 0
which confirms my problem in this case.
Annoyingly, restarting the server solves the problem (temporarily).
The data modifications are found and the correct tree is available.
In order to maintain correct data I could restart slapd each 5
minutes, but I think such a solution should be avoided in any case.
Does anyone have a suggestion what could be wrong with my setup?
Thanks in advance.
Frederik Bosch
--
--------------------------------------------
| Echedey Lorenzo Arencibia |
--------------------------------------------