ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject ignite git commit: IGNITE-2965 Failed to read class name from file on deserialization
Date Fri, 08 Apr 2016 15:44:58 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2965 [created] 4b0760670


IGNITE-2965
Failed to read class name from file on deserialization


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

Branch: refs/heads/ignite-2965
Commit: 4b076067022e2e510b03d6a4faaf7ed3ee281d80
Parents: 083acbd
Author: Anton Vinogradov <av@apache.org>
Authored: Fri Apr 8 18:44:13 2016 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Fri Apr 8 18:44:13 2016 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/MarshallerContextImpl.java  | 5 +++--
 .../ignite/internal/processors/cache/GridCacheAdapter.java      | 2 +-
 .../ignite/internal/processors/cache/GridCacheProxyImpl.java    | 4 ++--
 .../ignite/internal/processors/cache/IgniteInternalCache.java   | 4 ++--
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java        | 4 ++--
 .../processors/cache/distributed/near/GridNearAtomicCache.java  | 4 ++--
 6 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index 05fe8ef..32156de 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -119,7 +119,7 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
         String old;
 
         try {
-            old = cache0.tryPutIfAbsent(id, clsName);
+            old = cache0.tryGetAndPut(id, clsName);
 
             if (old != null && !old.equals(clsName))
                 throw new IgniteCheckedException("Type ID collision detected [id=" + id +
", clsName1=" + clsName +
@@ -177,7 +177,8 @@ public class MarshallerContextImpl extends MarshallerContextAdapter {
                     }
                 }
                 catch (IOException e) {
-                    throw new IgniteCheckedException("Failed to read class name from file
[id=" + id +
+                    throw new IgniteCheckedException("Class definition not found. " +
+                        "Failed to read class name from file [id=" + id +
                         ", file=" + file.getAbsolutePath() + ']', e);
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index ff4ba6d..58fce3d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2531,7 +2531,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException
{
+    @Nullable @Override public V tryGetAndPut(K key, V val) throws IgniteCheckedException
{
         // Supported only in ATOMIC cache.
         throw new UnsupportedOperationException();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index 03735cf..84c5d73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -1274,11 +1274,11 @@ public class GridCacheProxyImpl<K, V> implements IgniteInternalCache<K,
V>, Exte
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException
{
+    @Nullable @Override public V tryGetAndPut(K key, V val) throws IgniteCheckedException
{
         CacheOperationContext prev = gate.enter(opCtx);
 
         try {
-            return delegate.tryPutIfAbsent(key, val);
+            return delegate.tryGetAndPut(key, val);
         }
         finally {
             gate.leave(prev);

http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
index 240fe7a..5294f6a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java
@@ -1900,7 +1900,7 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K,
V>> {
     public V getTopologySafe(K key) throws IgniteCheckedException;
 
     /**
-     * Tries to put value in cache. Will fail with {@link GridCacheTryPutFailedException}
+     * Tries to get and put value in cache. Will fail with {@link GridCacheTryPutFailedException}
      * if topology exchange is in progress.
      *
      * @param key Key.
@@ -1908,7 +1908,7 @@ public interface IgniteInternalCache<K, V> extends Iterable<Cache.Entry<K,
V>> {
      * @return Old value.
      * @throws IgniteCheckedException In case of error.
      */
-    @Nullable public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException;
+    @Nullable public V tryGetAndPut(K key, V val) throws IgniteCheckedException;
 
     /**
      * @param topVer Locked topology version.

http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index a7eaadf..fc1424c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -471,7 +471,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException {
+    @Override public V tryGetAndPut(K key, V val) throws IgniteCheckedException {
         A.notNull(key, "key", val, "val");
 
         return (V)updateAsync0(
@@ -480,7 +480,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
             null,
             null,
             true,
-            ctx.noVal(),
+            null,
             false).get();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/4b076067/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 5bb9aaa..a7481d3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -471,8 +471,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public V tryPutIfAbsent(K key, V val) throws IgniteCheckedException
{
-        return dht.tryPutIfAbsent(key, val);
+    @Nullable @Override public V tryGetAndPut(K key, V val) throws IgniteCheckedException
{
+        return dht.tryGetAndPut(key, val);
     }
 
     /** {@inheritDoc} */


Mime
View raw message