<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 24 Jul 2012, at 20:44, Galder Zamarreņo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Mircea, one last thing. Why is there a check for local here?<br><br><a href="https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/interceptors/locking/OptimisticLockingInterceptor.java#L95">https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/interceptors/locking/OptimisticLockingInterceptor.java#L95</a><br><br>That basically means that concurrent cluster wide conditional removes won't work with OL + RR + writeSkew.<br><br>Is there a reason why you added this local check?<br></span></blockquote><div><br></div>That code was added with ISPN-1941 and only handles write skew (ws) for local caches, Manik might comment a bit more about it.</div><div>The code that handles ws for distributed caches is in the&nbsp;VersionedEntryWrappingInterceptor(VEWI).</div><div><br></div><div>I don't think that that code you pointed belongs to the OptimisticLockingInterceptor (OLI) for two reasons: the OLI is should handle the locking and write skew checking is an orthogonal concern. Also the rest of write skew checking is handled in the VEWI, so this logic should be placed there as well. &nbsp;</div><div>TBH I think write skew check logic deserve its own dedicated interceptor as the code in this area is spread over too many places: OLI,&nbsp;VEWI &nbsp;and some not nice static methods in the&nbsp;ClusteringDependentLogic. At least for me it is quite hard to follow it as it is now. Wdyt?</div><div><br></div><div>Cheers,</div><div>Mircea</div><div><br></div><div><br></div><br></body></html>