I'm dumb... And this is plain normal, I currently don't have time to
focus on this part of the code, so I'm just trying to fix it the wrong
way (ie, doig this and that quite randomly).

We do have a ReadTransaction class which *must* be use for any read of a
b-tree, and i'm not using it. The very same for the update methods.



Le 1/21/14 1:44 AM, Emmanuel Lécharny a écrit :
> I'm still fighting with the multi-threaded in-memory B-tree.
>
> The way we handle the rootpage is not correct : we use it in search
> operations while it can be modified in insert/delete operations. I tried
> to protect it by using two different variable (a currentRootPage and a
> newRootPage, which get swaped whe the update operation is committed) but
> it's not enough, I still have some bad insertions quite frenquently.
> This is typical to a concurrent pb.
>
> I also realized that the variable to protect is not the rootPage, but
> the btreeHeader, which should give access to the current rootPage. In
> fact, anything that can change during an update should be copied, and
> insolated from any search operation.
>
> Also the in-memory B-tree does not support multi-version atm, and this
> is something we must fix.
>
> A lot to do in this area...
>
>
> Le 1/19/14 2:28 PM, Kiran Ayyagari a écrit :
>> thanks Emmanuel for the heads up, I will give it a try tonight
>>
>>
>> On Fri, Jan 17, 2014 at 11:19 PM, Emmanuel Lécharny 
>> <elecha...@gmail.com>wrote:
>>
>>> Next step : completed. I'm now able to get data from many revisions of a
>>> B-tree.
>>>
>>> The insert and delete operations are now fully functional.
>>>
>>> Most of the tests are now passing, I still have 2 errors and one failure :
>>> testManagedBTreeBuilding is in error
>>> testBTreesDuplicateKeys is in error
>>> and
>>> testInsertMultiThreads is in failure
>>>
>>> This last failure is certainly due to a concurrent access I have to
>>> investigate.
>>>
>>> Anyway, as soon as the test will pass, I will commit my changes.
>>>
>>> Note that the grabage collection of old pages is still to be done, but
>>> we now have saved the pages to be freed in the file.
>>>
>>> --
>>> Regards,
>>> Cordialement,
>>> Emmanuel Lécharny
>>> www.iktek.com
>>>
>>>
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to