directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari (JIRA)" <>
Subject [jira] Commented: (DIRSERVER-1377) Potential concurrency issue when adding/modifying/deleting entries at a high rate
Date Fri, 19 Jun 2009 14:50:07 GMT


Kiran Ayyagari commented on DIRSERVER-1377:

Though theoretically all the above stands, implementation of the de/serializer under question
is a bit simple because

 The JdbmTable (on which JdbmIndex is based) does an internal check about allowing duplicate
keys, *iff* duplicates are allowed then
 it creates an AvlTree and stores the value(s) in it. Note that even if a key has a single
value and the duplicates are allowed in a table
 then the value will be stored in a AvlTree. 
 If the size of this AvlTree increases beyond a threshold then this AvlTree values will be
copied to a Jdbm BTree and the record Id is stored instead of 
 the AvlTree.

So the only values that need to be taken care by the serializer are 1. AvlTree or 2. BTreeRedirect
(which holds the record Id of jdbm BTree)

--- Update about fix --

Have tried with the new serializer but that didn't solve the problem, IMO the issue is with
the way the AvlTree is modified in the JdbmTable's put() and remove() methods.
To test this I have synchronized these methods and haven't encountered the NPE. This may not
be an acceptable solution, but just to mention.

> Potential concurrency issue when adding/modifying/deleting entries at a high rate
> ---------------------------------------------------------------------------------
>                 Key: DIRSERVER-1377
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Bug
>    Affects Versions: 1.5.4
>            Reporter: Emmanuel Lecharny
>            Priority: Blocker
>             Fix For: 1.5.5
> When adding/deleting entries with many clients (a client add and delete an entry many
times), we may have some concurrency problem, as the index are updated without concurrent
acces protection.
> Synchronizing the classes where we update the index might help.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message