[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Is the graph cache thread-safe ?
- To: openldap-fortress@openldap.org
- Subject: Is the graph cache thread-safe ?
- From: Emmanuel LÃcharny <elecharny@gmail.com>
- Date: Fri, 12 Jul 2013 12:41:22 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; bh=E1Q2rxdvKjNdtAg0gJ072uT0mLPv53n2jcDvBHXeKRg=; b=nTvaHDtlS10AOHZvEDbvpr4PFdVwydKV3wkQbsQP7rrDSLnuaCkgwqOVRTn+DVmCEf pjuUrEwP2TVCnfMy46eR/QLy3n7ftbey+L4dZ7uE2xJjqq7LMvKih+MZ8JsMTdDKcM14 uWSVGGdFDjc96A/7HRSpGOvi7KZYpGPRicaPdAfNYbZ1bt0tIPkOKr8TpHd7fn82DN21 dzFVcm9UXGENWz7yrDWdMT5vaJZM98j1udDX4qJO9B+0u1PLhXEGb09emT66xmwGoNwX 3q2lokFmLdybCIwGI14ZGRV1rqablgK8xFfs110LbNW2zsCMZOuFL975OnFUYMnEL99z RgEw==
- User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7
Hi Shawn,
yesterday, while stepping the code, I saw that we are using a cache to
handle the hierarchical relationship between roles. I'm afraid that the
'graph' object used to cache those elements is not thread-safe : we
protect it against concurrent modificatins, but that's not enough, as we
should also protect the graph against concurrent access. You may have
corner cases where one thread could fetch some data from this cache
while at the same time another thread is modifying the cache.
I'm just saying that from the code I have read yesterday in the train,
so I'm not 100% sure that this part of the code is at risk. I will
probably do some more investigation, but I'd like to know what are your
thoughts about it.
Thanks !
--
Regards,
Cordialement,
Emmanuel LÃcharny
www.iktek.com