ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1.5 Fixed hang on metadata update inside put in atomic cache when topology read lock is held.
Date Mon, 21 Dec 2015 14:00:15 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 7cceff4a3 -> fe9e6f099


ignite-1.5 Fixed hang on metadata update inside put in atomic cache when topology read lock
is held.


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

Branch: refs/heads/ignite-1537
Commit: fe9e6f0996c96b7d561bb8fa3fe5b9b604200088
Parents: 7cceff4
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Dec 21 17:00:06 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Dec 21 17:00:06 2015 +0300

----------------------------------------------------------------------
 .../cache/binary/CacheObjectBinaryProcessorImpl.java | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fe9e6f09/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
index 615b1a5..36558e7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/CacheObjectBinaryProcessorImpl.java
@@ -286,7 +286,7 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
         }
 
         for (Map.Entry<Integer, BinaryMetadata> e : metaBuf.entrySet())
-            addMeta(e.getKey(), e.getValue().wrap(binaryCtx));
+            addMeta(e.getKey(), e.getValue().wrap(binaryCtx), false);
 
         metaBuf.clear();
 
@@ -475,6 +475,15 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
 
     /** {@inheritDoc} */
     @Override public void addMeta(final int typeId, final BinaryType newMeta) throws BinaryObjectException
{
+        addMeta(typeId, newMeta, true);
+    }
+
+    /**
+     * @param typeId Type ID.
+     * @param newMeta New meta data.
+     * @param tryInvoke If {@code true} uses {@link IgniteCacheProxy#tryInvoke} for metadata
update.
+     */
+    public void addMeta(final int typeId, final BinaryType newMeta, boolean tryInvoke) {
         assert newMeta != null;
         assert newMeta instanceof BinaryTypeImpl;
 
@@ -486,7 +495,9 @@ public class CacheObjectBinaryProcessorImpl extends IgniteCacheObjectProcessorIm
             BinaryMetadata oldMeta = metaDataCache.localPeek(key);
             BinaryMetadata mergedMeta = BinaryUtils.mergeMetadata(oldMeta, newMeta0);
 
-            BinaryObjectException err = metaDataCache.tryInvoke(key, new MetadataProcessor(mergedMeta));
+            BinaryObjectException err = tryInvoke ?
+                metaDataCache.tryInvoke(key, new MetadataProcessor(mergedMeta)) :
+                metaDataCache.invoke(key, new MetadataProcessor(mergedMeta));
 
             if (err != null)
                 throw err;


Mime
View raw message