ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [06/46] ignite git commit: IGNITE-5527: Prevent starvation in stripe pool on unstable topology.
Date Fri, 07 Jul 2017 09:34:09 GMT
IGNITE-5527: Prevent starvation in stripe pool on unstable topology.

(cherry picked from commit 97ea507)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f3912902
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f3912902
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f3912902

Branch: refs/heads/ignite-2.1
Commit: f39129020999561e9def300b9cc136138ea3698e
Parents: 6c9d222
Author: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Authored: Fri Jun 16 19:54:26 2017 +0300
Committer: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Committed: Tue Jul 4 17:39:28 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridDeferredAckMessageSender.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f3912902/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
index 89aa725..a8e8226 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
@@ -173,7 +173,8 @@ public abstract class GridDeferredAckMessageSender<T> {
          * @return {@code True} if request was handled, {@code false} if this buffer is filled
and cannot be used.
          */
         public boolean add(T ver) {
-            readLock().lock();
+            if(!readLock().tryLock())
+                return false; // Here, writeLock is help by another thread and guard is already
true.
 
             boolean snd = false;
 


Mime
View raw message