directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selcuk AYA <ayasel...@gmail.com>
Subject Re: Txns & tests heads up
Date Sat, 24 Dec 2011 20:45:38 GMT
On Sat, Dec 24, 2011 at 9:33 PM, Alex Karasulu <akarasulu@apache.org> wrote:
>
>
> On Sat, Dec 24, 2011 at 3:51 PM, Emmanuel Lecharny <elecharny@gmail.com>
> wrote:
>>
>> Hi,
>>
>> I'm fixing tests in core-integ, and so far, I still have some issues in
>> uathz (SearchAuthorizationIT) and in schema. All the other tests are now
>> passing.
>>
>> I have moved the txns borders into the OperationManager, and for searches,
>> the cursor commit or abort the txn in the close() and close(exception)
>> methods.
>>
>
> Why is the OM better than the CoreSession? Just curious what made you choose
> this route. Forgive me if this was discussed in an earlier email.

Related to this point, just curious, how did you handle the tests that
call CoreSession directly? Did you put txn boundaries for each call ?

>
>>
>> I think we should find a way to implicitely commit or abort the txns even
>> if the user does not close() the cursors, otherwise it might be extremely
>> painful for them. I was thinking about adding a finalaizer in the cursor to
>> finish the txns, but it's not a perfect solution (as it depends on the GC to
>> be executed.
>
>
> Oh please don't do this - we should be able to find a better solution I am
> sure. There are a myriad of reasons why this is a bad idea IMHO. We can
> discuss this once I settle down in one place .. .still traveling.
>
>>
>> Damn I miss the C++ explicit destuctors :/).
>> Something more useful would be to allow any txns to reuse an existing
>> txns.

I dont think there is any difference between closing a cursor
explicitly and calling a destructor explicitly. Just like it is
reasonable to expect users to close streams or file handles, it is
reasonable to expect users to close cursors I think.

>
>
> YES this is what we need to do for re-entry but there may need to be some
> configurable parameter for this.
>
> Maybe we can Skype on this to be fast and report back to the ML.
>
>>
>> Of course, there are some drawbacks, but I think it's probably a better
>> approach.
>>
>
> +1
>
>
> --
> Best Regards,
> -- Alex
>

Mime
View raw message