Hi

> Am 08.04.2015 um 11:12 schrieb Michael Dürig <mdue...@apache.org>:
> 
> 
> 
> On 8.4.15 10:57 , Julian Reschke wrote:
>>> Turns out that checking for item existence before accessing the item
>>> is JCR API best practice. So Sling follows best practice.
>> 
>> Why would it be best practice?

Hmm, yes, looks like I misread something. So while it may not be JCR API best 
practices, using exceptions for flow control is not really good and actually 
expensive also considering:

>> You need to handle an exception anyway
>> (due to possible race conditions).
> 
> With Oak you generally don't have such races thanks to MVCC. But in general 
> you are right, checking existence before access is prone to races.

Indeed, I would not know of a case where such a race condition really created 
an issue in reality …

Regards
Felix

Reply via email to