<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 25 Jul 2012, at 12:26, Galder Zamarreņo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Jul 25, 2012, at 1:14 PM, Mircea Markus wrote:<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">On 24 Jul 2012, at 20:44, Galder Zamarreņo wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Mircea, one last thing. Why is there a check for local here?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><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></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">That basically means that concurrent cluster wide conditional removes won't work with OL + RR + writeSkew.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Is there a reason why you added this local check?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">That code was added with ISPN-1941 and only handles write skew (ws) for local caches, Manik might comment a bit more about it.<br></blockquote><blockquote type="cite">The code that handles ws for distributed caches is in the VersionedEntryWrappingInterceptor(VEWI).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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;<br></blockquote><blockquote type="cite">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, VEWI &nbsp;and some not nice static methods in the ClusteringDependentLogic. At least for me it is quite hard to follow it as it is now. Wdyt?<br></blockquote><br>Good points. So, we need a better way of doing write skew checks both local and in cluster, from a more centralized place then?<br><br>Let's see what Manik and others say, but won't be able to properly fix this before I go on holidays. There's a valid workaround for it though, so not massively urgent.<font class="Apple-style-span" color="#3d751a"><br></font></div></blockquote>+1.&nbsp;</div><br></body></html>