Further to above, since we have row-locking I'm hopeful that we cannot
endup with a dirty read as explained in [1], with the current setup. Am I
missing something?

[1] http://msdn.microsoft.com/en-us/library/ms173763.aspx

Thanks,
Senaka.


On Mon, Aug 18, 2014 at 11:36 PM, Senaka Fernando <sen...@wso2.com> wrote:

> Hi Sumedha,
>
> Alright but this SELECT is across different tables, and I also happened to
> find this, [1]. So, unless you are in a transaction, if somebody updates
> while you read, you can end up having messed up data right?
>
> [1]
> http://stackoverflow.com/questions/1976686/is-there-a-difference-between-a-select-statement-inside-a-transaction-and-one-th
>
> Thanks,
> Senaka.
>
>
> On Mon, Aug 18, 2014 at 11:29 PM, Sumedha Rubasinghe <sume...@wso2.com>
> wrote:
>
>> Senaka,
>> I don't think doing a SELECT inside transaction here is required. We just
>> read the committed data @ the time of reading. That's it.
>>
>> We never SELECT records for UPDATES (which is one occurrence where doing
>> a SELECT inside transaction is useful). Another common usecase if to read
>> uncommitted data.
>>
>> But we use neither of these scenarios. So I believe there is not need to
>> read within transaction blocks.
>>
>>
>>
>>
>>  On Tue, Aug 19, 2014 at 3:49 AM, Senaka Fernando <sen...@wso2.com>
>> wrote:
>>
>>> Hi Subash,
>>>
>>> Ah! forgot to discuss this today when we chatted.
>>>
>>> Subash the get() itself is a call spanning across multiple tables and
>>> for the sake of a DB-neutral implementation we have kept the queries basic.
>>> So this means we handle some joins etc at application-level. This is why it
>>> has to be transactional.
>>>
>>> But, I was under the impression that the cache solves this issue
>>> altogether with the get() doing nothing @ Embedded Registry level. Isn't
>>> this the case or are you talking about first call slow-down?
>>>
>>> Thanks,
>>> Senaka.
>>>
>>>
>>> On Mon, Aug 18, 2014 at 6:36 AM, Subash Chaturanga <sub...@wso2.com>
>>> wrote:
>>>
>>>> Hi Senaka et al,
>>>> Is there any particular reason for doing $subject ? Because
>>>> transactional db connection is always heavy and many applications doing the
>>>> GET quite frequently. IMO we should not be doing a read in a transactional
>>>> manner. Pls correct me if I am missing something.
>>>>
>>>> I am referring EmbeddedRegitry#get.
>>>>
>>>> --
>>>> Thanks
>>>> /subash
>>>>
>>>> *Subash Chaturanga*
>>>> Senior Software Engineer & Lead WSO2 Governance Registry
>>>> Platform TG; WSO2 Inc. http://wso2.com
>>>> Contact:
>>>> email: sub...@wso2.com
>>>> blog:  http://subashsdm.blogspot.com/
>>>> twitter: @subash89
>>>> phone: +9477 2225922
>>>> Lean . Enterprise . Middleware
>>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>> *[image: http://wso2.com] <http://wso2.com> Senaka Fernando*
>>> Software Architect; WSO2 Inc.; http://wso2.com
>>>
>>>
>>>
>>> * Member; Apache Software Foundation; http://apache.org
>>> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1
>>> 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>>>
>>>
>>> *M: +44 782 741 1966 <%2B44%20782%20741%201966> Linked-In:
>>> http://linkedin.com/in/senakafernando
>>> <http://linkedin.com/in/senakafernando>*
>>> Lean . Enterprise . Middleware
>>>
>>
>>
>>
>> --
>> /sumedha
>> m: +94 773017743
>> b :  bit.ly/sumedha
>>
>
>
>
> --
>
>
> *[image: http://wso2.com] <http://wso2.com> Senaka Fernando*
> Software Architect; WSO2 Inc.; http://wso2.com
>
>
>
> * Member; Apache Software Foundation; http://apache.org
> <http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1
> 408 754 7388 <%2B1%20408%20754%207388>; ext: 51736*;
>
>
> *M: +44 782 741 1966 <%2B44%20782%20741%201966> Linked-In:
> http://linkedin.com/in/senakafernando
> <http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
>



-- 


*[image: http://wso2.com] <http://wso2.com> Senaka Fernando*
Software Architect; WSO2 Inc.; http://wso2.com



* Member; Apache Software Foundation; http://apache.org
<http://apache.org>E-mail: senaka AT wso2.com <http://wso2.com>**P: +1 408
754 7388 <%2B1%20408%20754%207388>; ext: 51736*;


*M: +44 782 741 1966 <%2B44%20782%20741%201966> Linked-In:
http://linkedin.com/in/senakafernando
<http://linkedin.com/in/senakafernando>*Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to