ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: BinaryMetadataTransport: do not cache local node id, it can change after client reconnect.
Date Wed, 29 Nov 2017 08:39:38 GMT
Repository: ignite
Updated Branches:
  refs/heads/master eef5afdac -> 89c82f5fa


BinaryMetadataTransport: do not cache local node id, it can change after client reconnect.


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

Branch: refs/heads/master
Commit: 89c82f5fa972828b528f70152c18a59b97e413a4
Parents: eef5afd
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Nov 29 11:36:49 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Nov 29 11:36:49 2017 +0300

----------------------------------------------------------------------
 .../cache/binary/BinaryMetadataTransport.java   | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/89c82f5f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
index 3a77190..def7caa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataTransport.java
@@ -69,9 +69,6 @@ final class BinaryMetadataTransport {
     private final IgniteLogger log;
 
     /** */
-    private final UUID locNodeId;
-
-    /** */
     private final boolean clientNode;
 
     /** */
@@ -117,8 +114,6 @@ final class BinaryMetadataTransport {
 
         discoMgr = ctx.discovery();
 
-        locNodeId = ctx.localNodeId();
-
         clientNode = ctx.clientNode();
 
         discoMgr.setCustomEventListener(MetadataUpdateProposedMessage.class, new MetadataUpdateProposedListener());
@@ -170,7 +165,7 @@ final class BinaryMetadataTransport {
             unlabeledFutures.add(resFut);
 
             if (!stopping)
-                discoMgr.sendCustomEvent(new MetadataUpdateProposedMessage(metadata, locNodeId));
+                discoMgr.sendCustomEvent(new MetadataUpdateProposedMessage(metadata, ctx.localNodeId()));
             else
                 resFut.onDone(MetadataUpdateResult.createUpdateDisabledResult());
         }
@@ -299,7 +294,7 @@ final class BinaryMetadataTransport {
                 acceptedVer = msg.acceptedVersion();
             }
 
-            if (locNodeId.equals(msg.origNodeId())) {
+            if (ctx.localNodeId().equals(msg.origNodeId())) {
                 MetadataUpdateResultFuture fut = unlabeledFutures.poll();
 
                 if (msg.rejected())
@@ -540,12 +535,16 @@ final class BinaryMetadataTransport {
             this.ver = ver;
         }
 
-        /** */
+        /**
+         * @return Type ID.
+         */
         int typeId() {
             return typeId;
         }
 
-        /** */
+        /**
+         * @return Version.
+         */
         int version() {
             return ver;
         }
@@ -627,7 +626,6 @@ final class BinaryMetadataTransport {
      * Listener is registered on each client node and listens for metadata responses from
cluster.
      */
     private final class MetadataResponseListener implements GridMessageListener {
-
         /** {@inheritDoc} */
         @Override public void onMessage(UUID nodeId, Object msg, byte plc) {
             assert msg instanceof MetadataResponseMessage : msg;
@@ -674,8 +672,6 @@ final class BinaryMetadataTransport {
                 fut.onDone(MetadataUpdateResult.createFailureResult(new BinaryObjectException(e)));
             }
         }
-
-
     }
 
     /**


Mime
View raw message