<br><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 3:41 PM, William Burns <span dir="ltr">&lt;<a href="mailto:mudokonman@gmail.com" target="_blank">mudokonman@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On Fri, Jun 28, 2013 at 5:53 AM, Dan Berindei &lt;<a href="mailto:dan.berindei@gmail.com">dan.berindei@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Jun 28, 2013 at 12:51 AM, William Burns &lt;<a href="mailto:mudokonman@gmail.com">mudokonman@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Jun 27, 2013 at 4:40 PM, Dan Berindei &lt;<a href="mailto:dan.berindei@gmail.com">dan.berindei@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Thu, Jun 27, 2013 at 4:40 PM, William Burns &lt;<a href="mailto:mudokonman@gmail.com">mudokonman@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Comments that were outstanding on PR:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; @danberindei:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;  &gt; +1 to move the discussion to the mailing list, could you summarize<br>
&gt;&gt; &gt;&gt; your changes (preferably for both non-tx and tx cases) and send an<br>
&gt;&gt; &gt;&gt; email to the list?<br>
&gt;&gt; &gt;&gt;  &gt; And now to add some more to this already unwieldy discussion :)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;  &gt;  1. Many interceptors check ownership, I don&#39;t think that would be<br>
&gt;&gt; &gt;&gt; a problem. Besides, I think creating a new L1ReadSynchronizer for<br>
&gt;&gt; &gt;&gt; every read is just as bad for performance as locking the key on every<br>
&gt;&gt; &gt;&gt; read, so you&#39;d need that check either way.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; We can&#39;t use a try lock approach for L1 invalidation when gets are<br>
&gt;&gt; &gt;&gt; locked without possibly dropping a L1 update<br>
&gt;&gt; &gt;&gt; We can&#39;t use a timed lock approach for L1 invalidation when writes<br>
&gt;&gt; &gt;&gt; lock the key as we could get into a timed deadlock situation when<br>
&gt;&gt; &gt;&gt; another node concurrently writes to a value/stripe<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I still don&#39;t see how we can get away with locking on a get.  What are<br>
&gt;&gt; &gt;&gt; you proposing?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;m proposing something like this:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 1. For get commands: acquire local lock + remote get + store in L1 +<br>
&gt;&gt; &gt; release<br>
&gt;&gt; &gt; local lock<br>
&gt;&gt; &gt; 2. For invalidate commands: acquire local lock + remove entry from L1 +<br>
&gt;&gt; &gt; release local lock<br>
&gt;&gt; &gt; 3. For write commands: invoke on primary owner, and the primary owner<br>
&gt;&gt; &gt; sends<br>
&gt;&gt; &gt; invalidation back to originator; alternatively, skip the invalidation<br>
&gt;&gt; &gt; command to the originator and do invoke on primary owner + acquire local<br>
&gt;&gt; &gt; lock + remove entry from L1 + release local lock<br>
&gt;&gt;<br>
&gt;&gt; I do like this and think it would be simpler for non-tx.  However this<br>
&gt;&gt; will still not be as performant I wouldn&#39;t think (just a gut feeling).<br>
&gt;<br>
&gt;<br>
&gt; It would indeed be less performant in some cases, e.g. if we have two get<br>
&gt; commands for a remote key at the same time and the key doesn&#39;t exist, my<br>
&gt; proposal would request the key twice.<br>
&gt;<br>
&gt; The writes to L1 *should* be rare enough that the extra lock contention<br>
&gt; there would be minimal. There is a chance that an invalidation will be stuck<br>
&gt; waiting for a remote get, so it will again be slower than your approach.<br>
&gt;<br>
&gt;&gt;  However I am more than certain it will be slower when collisions<br>
&gt;&gt; occur, which is more likely with lock striping.<br>
&gt;&gt;<br>
&gt;<br>
&gt; I&#39;m not that worried about lock striping - the user can always increase the<br>
&gt; number of stripes to get less contention. And I hope they know better than<br>
&gt; to use lock striping and transactions with multiple keys, or they&#39;ll get<br>
&gt; deadlocks with or without L1 enabled.<br>
<br>
</div></div>I didn&#39;t think of the deadlock problem with tx and lock striping.  I<br>
am wondering should we log a warning message so that user&#39;s get an<br>
explicit warning?<br></blockquote><div><br>Yeah, I think a warning would be nice - especially in the documentation, it looks way too innocuous.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="im">&gt;<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t think this however is feasible for tx caches.<br>
&gt;&gt;<br>
&gt;&gt; Optimistic - we don&#39;t want to have gets being blocked when the tx is<br>
&gt;&gt; being committed - that could be quite a bit of a performance hit<br>
&gt;&gt; especially if it has to do a 2 phase commit.  Updating the L1 on a<br>
&gt;&gt; remoteGetBeforeWrites  could help remedy this (since get wouldn&#39;t need<br>
&gt;&gt; to lock), however then you would be almost implementing what I have<br>
&gt;&gt; and still have locking overhead.  Maybe this would occur so<br>
&gt;&gt; infrequently it wouldn&#39;t matter though?<br>
&gt;&gt;<br>
&gt;<br>
&gt; Yes, I would propose removing the L1 commit in EntryWrappingInterceptor as<br>
&gt; well, and moving it to the L1 interceptor - immediately after the value was<br>
&gt; retrieved from the remote owner. The local lock would also be released<br>
&gt; immediately.<br>
&gt;<br>
&gt; The part I wanted to avoid from your proposal was<br>
&gt; L1ReadSync/L1ReadSynchronizer, because I found it kind of hard to<br>
&gt; understand. I guess I&#39;d find it more approachable all the synchronization<br>
&gt; (the map of L1ReadSynchronizers and the interaction with it) would be in a<br>
&gt; separate class, with its own tests, and the L1 interceptor would only know<br>
&gt; about the high-level stuff. Like the LockManager also hides a map of locks;<br>
&gt; not like the LockManager unit tests, because they&#39;re kind of lacking, but<br>
&gt; LockManager has the advantage that almost all the tests touch it indirectly.<br>
&gt;<br>
<br>
</div>True, I agree I like it as a separate class better - much better<br>
separation.  Maybe I can move that over and add tests and see if that<br>
makes it more clear?  If not we can still always use the locking<br>
approach.<br></blockquote><div><br>+1<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">&gt;&gt;<br>
&gt;&gt; Pessimistic - I haven&#39;t looked into pessimistic closely yet, but in<br>
&gt;&gt; that case I don&#39;t think it ever acquires the local locks so it would<br>
&gt;&gt; have to acquire a remote lock on a get, which would be pretty<br>
&gt;&gt; disastrous (gets would indirectly have a weak FORCE_WRITE_LOCK<br>
&gt;&gt; enabled).  Making this to acquire local locks might work as well, but<br>
&gt;&gt; then would still have the same issue as optimistic when committing - I<br>
&gt;&gt; really am not as familiar with Pessimistic to say for sure.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Nope, acquiring a local lock should be enough. We don&#39;t want to prevent<br>
&gt; other txs from modifying the key at all, we just want to delay the<br>
&gt; invalidation commands triggered by those modifications on the local node.<br>
&gt; And the lock would only be held for the duration of the remote get + L1<br>
&gt; update, not all the way to the commit.<br>
&gt;<br>
</div>Okay, cool.  I didn&#39;t know for sure.<br>
<div class="HOEnZb"><div class="h5">&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; All the lock acquisitions would use a regular timeout, not a try lock<br>
&gt;&gt; &gt; approach.<br>
&gt;&gt; In this case they could, yes.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;   2. By default L1 invalidations are sent as multicasts, so I&#39;m not<br>
&gt;&gt; &gt;&gt; &gt; sure<br>
&gt;&gt; &gt;&gt; &gt; ISPN-3273 really matters here. BTW, I wonder if we have a check to<br>
&gt;&gt; &gt;&gt; &gt; only send<br>
&gt;&gt; &gt;&gt; &gt; L1 invalidations from one node if the threshold is 0...<br>
&gt;&gt; &gt;&gt; I agree that is the default, but we should support the operation,<br>
&gt;&gt; &gt;&gt; although it doesn&#39;t matter for this discussion.  Also I am curious as<br>
&gt;&gt; &gt;&gt; to why multicast for L1 isn&#39;t set to say 2 by default?  It seems<br>
&gt;&gt; &gt;&gt; wasteful to send a multicast to all members that they process when<br>
&gt;&gt; &gt;&gt; only 1 would do anything about it.  Do you know why this is like that?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I suppose it&#39;s because we don&#39;t have good perf numbers for different L1<br>
&gt;&gt; &gt; invalidation threshold numbers...<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The problem is, we don&#39;t have a way to count all the requestors of a key<br>
&gt;&gt; &gt; in<br>
&gt;&gt; &gt; the cluster, so it&#39;s reasonably likely that with a threshold of 2 you&#39;d<br>
&gt;&gt; &gt; get<br>
&gt;&gt; &gt; 1 unicast invalidation from one owner + 1 multicast invalidation from<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; other owner, making it less efficient than a single multicast<br>
&gt;&gt; &gt; invalidation.<br>
&gt;&gt;<br>
&gt;&gt; It is a nitpick anyways, and really shouldn&#39;t make that big of a<br>
&gt;&gt; difference.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;  3a. Right, for put commands we can&#39;t hold the local lock while<br>
&gt;&gt; &gt;&gt; &gt; executing the remote put, or we&#39;ll have a deadlock. But I think a<br>
&gt;&gt; &gt;&gt; &gt; shorter<br>
&gt;&gt; &gt;&gt; &gt; lock, held only after the remote put completed (or after the lock on<br>
&gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt; &gt; primary owner was acquired, with txs) should work.<br>
&gt;&gt; &gt;&gt; Same point under 1<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I don&#39;t see how we could get a deadlock if we don&#39;t hold the local lock<br>
&gt;&gt; &gt; during the remote write invocation.<br>
&gt;&gt;<br>
&gt;&gt; Agree.<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;  3b. We&#39;d also have an ownership check before, so we&#39;d only serialize<br>
&gt;&gt; &gt;&gt; &gt; the get commands that need to go remotely for the same key. I think<br>
&gt;&gt; &gt;&gt; &gt; it would<br>
&gt;&gt; &gt;&gt; &gt; be almost the same as your solution (although it does have one ?<br>
&gt;&gt; &gt;&gt; &gt; disadvantage - if the key doesn&#39;t exist in the cache, all the get<br>
&gt;&gt; &gt;&gt; &gt; commands<br>
&gt;&gt; &gt;&gt; &gt; will go remotely). The number of L1 writes should be very small<br>
&gt;&gt; &gt;&gt; &gt; compared to<br>
&gt;&gt; &gt;&gt; &gt; the number of L1 reads anyway, otherwise it would be more efficient<br>
&gt;&gt; &gt;&gt; &gt; to get<br>
&gt;&gt; &gt;&gt; &gt; the key from the owner every time.<br>
&gt;&gt; &gt;&gt; You are saying an optimization for owner nodes so they don&#39;t do the<br>
&gt;&gt; &gt;&gt; &quot;corralling&quot; for keys they own?  I like that.  Also I don&#39;t think it<br>
&gt;&gt; &gt;&gt; has the disadvantage, it only does remotes it if isn&#39;t an owner.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I meant your corralling strategy means if you have 2 concurrent get<br>
&gt;&gt; &gt; commands<br>
&gt;&gt; &gt; and one of them retrieves a null from the entry owners, the other<br>
&gt;&gt; &gt; command<br>
&gt;&gt; &gt; will return null directly. With regular locking, the other command<br>
&gt;&gt; &gt; wouldn&#39;t<br>
&gt;&gt; &gt; find anything in L1 and it would do another remote get.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I don&#39;t think there&#39;s any disadvantage in skipping the corralling for<br>
&gt;&gt; &gt; key<br>
&gt;&gt; &gt; owners, in fact I think we need to skip it if the key already exists in<br>
&gt;&gt; &gt; L1,<br>
&gt;&gt; &gt; too.<br>
&gt;&gt; +1<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; It would be nice to agree on what guarantees we want to provide for<br>
&gt;&gt; &gt;&gt; &gt; L1<br>
&gt;&gt; &gt;&gt; &gt; invalidation in non-tx caches, I&#39;m not sure if we can do anything to<br>
&gt;&gt; &gt;&gt; &gt; prevent<br>
&gt;&gt; &gt;&gt; &gt; this scenario:<br>
&gt;&gt; &gt;&gt; Actually this scenario doesn&#39;t occur with non-tx since writes don&#39;t<br>
&gt;&gt; &gt;&gt; update the L1 with their value, they just invalidate.  Tx caches are<br>
&gt;&gt; &gt;&gt; fine with this because they acquire the primary owner lock for the<br>
&gt;&gt; &gt;&gt; duration of the write including the L1 update so you can&#39;t have this<br>
&gt;&gt; &gt;&gt; ordering.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Sounds good.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; A initiates a put(k, v1) to the primary owner B<br>
&gt;&gt; &gt;&gt; &gt; B performs the put(k, v1), invalidates every non-owner and returns<br>
&gt;&gt; &gt;&gt; &gt; B performs another put(k, v2), invalidating every non-owner<br>
&gt;&gt; &gt;&gt; &gt; A receives the result from B and puts k=v1 in its L1<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; @pruivo:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; The invalidation does not need to wait for the remote get. When you<br>
&gt;&gt; &gt;&gt; &gt; receive an invalidation, you can mark the current remote get invalid.<br>
&gt;&gt; &gt;&gt; &gt; The<br>
&gt;&gt; &gt;&gt; &gt; invalidation command can return immediately and the remote get can be<br>
&gt;&gt; &gt;&gt; &gt; repeated. Also, it removes the key from data container (if exists)<br>
&gt;&gt; &gt;&gt; Dan hit it right in the head.  Unfortunately there is no guarantee the<br>
&gt;&gt; &gt;&gt; cancellation can work properly, so it is a best effort and if not wait<br>
&gt;&gt; &gt;&gt; until we know we will invalidate properly.<br>
&gt;&gt; &gt;&gt; &gt; The writes can update the L1 through your L1Synchronized by adding a<br>
&gt;&gt; &gt;&gt; &gt; simple method like updateL1(newValue). The blocking threads will<br>
&gt;&gt; &gt;&gt; &gt; return<br>
&gt;&gt; &gt;&gt; &gt; immediately the new value and they don&#39;t need to wait for the reply.<br>
&gt;&gt; &gt;&gt; Non tx cache write operations aren&#39;t safe to update L1 with the value<br>
&gt;&gt; &gt;&gt; since they don&#39;t acquire the owning lock while updating the L1, which<br>
&gt;&gt; &gt;&gt; means you could have interleaved writes.  Which is the primary reason<br>
&gt;&gt; &gt;&gt; I rejected ISPN- 3214.  For tx caches we can&#39;t do this since the<br>
&gt;&gt; &gt;&gt; update has to take part of the tx, which the get would be updating the<br>
&gt;&gt; &gt;&gt; L1 outside of a transaction.<br>
&gt;&gt; &gt;&gt; &gt; I see... However, I think that all the events should synchronize at<br>
&gt;&gt; &gt;&gt; &gt; some<br>
&gt;&gt; &gt;&gt; &gt; point (update by remote get, update by local put and invalidation).<br>
&gt;&gt; &gt;&gt; I was hoping that would cover this.  Other than the outstanding issue<br>
&gt;&gt; &gt;&gt; in ISPN-2965.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Thu, Jun 27, 2013 at 9:18 AM, William Burns &lt;<a href="mailto:mudokonman@gmail.com">mudokonman@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; First off I apologize for the length.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; There have been a few Jiras recently that have identified L1<br>
&gt;&gt; &gt;&gt; &gt; consistency<br>
&gt;&gt; &gt;&gt; &gt; issues with both TX and non TX sync caches.  Async caches with L1<br>
&gt;&gt; &gt;&gt; &gt; have<br>
&gt;&gt; &gt;&gt; &gt; their<br>
&gt;&gt; &gt;&gt; &gt; own issues as well, but I only wanted to talk about sync caches.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; <a href="https://issues.jboss.org/browse/ISPN-3197" target="_blank">https://issues.jboss.org/browse/ISPN-3197</a><br>
&gt;&gt; &gt;&gt; &gt; <a href="https://issues.jboss.org/browse/ISPN-2965" target="_blank">https://issues.jboss.org/browse/ISPN-2965</a><br>
&gt;&gt; &gt;&gt; &gt; <a href="https://issues.jboss.org/browse/ISPN-2990" target="_blank">https://issues.jboss.org/browse/ISPN-2990</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I have proposed a solution in<br>
&gt;&gt; &gt;&gt; &gt; <a href="https://github.com/infinispan/infinispan/pull/1922" target="_blank">https://github.com/infinispan/infinispan/pull/1922</a> which should start<br>
&gt;&gt; &gt;&gt; &gt; L1<br>
&gt;&gt; &gt;&gt; &gt; consistency down the right track.  There are quite a few comments on<br>
&gt;&gt; &gt;&gt; &gt; it<br>
&gt;&gt; &gt;&gt; &gt; if<br>
&gt;&gt; &gt;&gt; &gt; you want to look into it more, but because of that I am moving this<br>
&gt;&gt; &gt;&gt; &gt; to<br>
&gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt; &gt; dev mailing list.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; The key changes in the PR are the following (non-tx):<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 1. Concurrent reads for a key that can retrieve a remote value are<br>
&gt;&gt; &gt;&gt; &gt; &quot;corralled&quot; into a single thread of execution for that given key.<br>
&gt;&gt; &gt;&gt; &gt; This<br>
&gt;&gt; &gt;&gt; &gt; would reduce network traffic with concurrent gets for the same key.<br>
&gt;&gt; &gt;&gt; &gt; Note<br>
&gt;&gt; &gt;&gt; &gt; the &quot;corralling&quot; only happens on a per key basis.<br>
&gt;&gt; &gt;&gt; &gt; 2. The single thread that is doing the remote get would update the L1<br>
&gt;&gt; &gt;&gt; &gt; if<br>
&gt;&gt; &gt;&gt; &gt; able (without locking) and make available the value to all the<br>
&gt;&gt; &gt;&gt; &gt; requests<br>
&gt;&gt; &gt;&gt; &gt; waiting on the get.<br>
&gt;&gt; &gt;&gt; &gt; 3. Invalidations that are received would first check to see if there<br>
&gt;&gt; &gt;&gt; &gt; is<br>
&gt;&gt; &gt;&gt; &gt; a<br>
&gt;&gt; &gt;&gt; &gt; current remote get occurring for it&#39;s keys.  If there is it will<br>
&gt;&gt; &gt;&gt; &gt; attempt<br>
&gt;&gt; &gt;&gt; &gt; to<br>
&gt;&gt; &gt;&gt; &gt; cancel the L1 write(s) before it occurs.  If it cannot cancel the L1<br>
&gt;&gt; &gt;&gt; &gt; write,<br>
&gt;&gt; &gt;&gt; &gt; then it must also wait on the current remote get completion and<br>
&gt;&gt; &gt;&gt; &gt; subsequently<br>
&gt;&gt; &gt;&gt; &gt; run the invalidation.  Note the cancellation would fail when the<br>
&gt;&gt; &gt;&gt; &gt; remote<br>
&gt;&gt; &gt;&gt; &gt; get<br>
&gt;&gt; &gt;&gt; &gt; was done and it is in the middle of updating the L1, so this would be<br>
&gt;&gt; &gt;&gt; &gt; very<br>
&gt;&gt; &gt;&gt; &gt; small window.<br>
&gt;&gt; &gt;&gt; &gt; 4. Local writes will also do the same thing as the invalidation with<br>
&gt;&gt; &gt;&gt; &gt; cancelling or waiting.  Note that non tx local writes only do L1<br>
&gt;&gt; &gt;&gt; &gt; invalidations and don&#39;t write the value to the data container.<br>
&gt;&gt; &gt;&gt; &gt; Reasons<br>
&gt;&gt; &gt;&gt; &gt; why<br>
&gt;&gt; &gt;&gt; &gt; I found at <a href="https://issues.jboss.org/browse/ISPN-3214" target="_blank">https://issues.jboss.org/browse/ISPN-3214</a><br>
&gt;&gt; &gt;&gt; &gt; 5. Writes that require the previous value and don&#39;t have it in the L1<br>
&gt;&gt; &gt;&gt; &gt; would<br>
&gt;&gt; &gt;&gt; &gt; also do it&#39;s get operations using the same &quot;corralling&quot; method.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 4/5 are not currently implemented in PR.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; This approach would use no locking for non tx caches for all L1<br>
&gt;&gt; &gt;&gt; &gt; operations.<br>
&gt;&gt; &gt;&gt; &gt; The synchronization point would be done through the &quot;corralling&quot;<br>
&gt;&gt; &gt;&gt; &gt; method<br>
&gt;&gt; &gt;&gt; &gt; and<br>
&gt;&gt; &gt;&gt; &gt; invalidations/writes communicating to it.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Transactional caches would do almost the same thing as non-tx.  Note<br>
&gt;&gt; &gt;&gt; &gt; these<br>
&gt;&gt; &gt;&gt; &gt; changes are not done in any way yet.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 1. Gets would now update the L1 immediately after retrieving the<br>
&gt;&gt; &gt;&gt; &gt; value<br>
&gt;&gt; &gt;&gt; &gt; without locking, but still using the &quot;corralling&quot; technique that<br>
&gt;&gt; &gt;&gt; &gt; non-tx<br>
&gt;&gt; &gt;&gt; &gt; does.  Previously the L1 update from a get was transactional.  This<br>
&gt;&gt; &gt;&gt; &gt; actually<br>
&gt;&gt; &gt;&gt; &gt; would remedy issue [1]<br>
&gt;&gt; &gt;&gt; &gt; 2. Writes currently acquire the remote lock when committing, which is<br>
&gt;&gt; &gt;&gt; &gt; why tx<br>
&gt;&gt; &gt;&gt; &gt; caches are able to update the L1 with the value.  Writes would do the<br>
&gt;&gt; &gt;&gt; &gt; same<br>
&gt;&gt; &gt;&gt; &gt; cancellation/wait method as non-tx.<br>
&gt;&gt; &gt;&gt; &gt; 3. Writes that require the previous value and don&#39;t have it in the L1<br>
&gt;&gt; &gt;&gt; &gt; would<br>
&gt;&gt; &gt;&gt; &gt; also do it&#39;s get operations using the same method.<br>
&gt;&gt; &gt;&gt; &gt; 4. For tx cache [2] would also have to be done.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; [1] -<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; <a href="https://issues.jboss.org/browse/ISPN-2965?focusedCommentId=12779780&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12779780" target="_blank">https://issues.jboss.org/browse/ISPN-2965?focusedCommentId=12779780&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12779780</a><br>


&gt;&gt; &gt;&gt; &gt; [2] - <a href="https://issues.jboss.org/browse/ISPN-1540" target="_blank">https://issues.jboss.org/browse/ISPN-1540</a><br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Also rehashing is another issue, but we should be able to acquire the<br>
&gt;&gt; &gt;&gt; &gt; state<br>
&gt;&gt; &gt;&gt; &gt; transfer lock before updating the L1 on a get, just like when an<br>
&gt;&gt; &gt;&gt; &gt; entry<br>
&gt;&gt; &gt;&gt; &gt; is<br>
&gt;&gt; &gt;&gt; &gt; committed to the data container.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Any comments/concerns would be appreciated.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;  - Will<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; infinispan-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br>