geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject incubator-geode git commit: GEODE-2137 client membership IDs contain 17 bytes of useless information
Date Fri, 02 Dec 2016 17:51:17 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 612a43872 -> a46cc976e


GEODE-2137 client membership IDs contain 17 bytes of useless information

There was a problem with the previous fix for this issue.  toData and
fromData methods in InternalDistributedMember also need to look at the
version of the data stream in order to decide whether to send the UUID
bytes or not.


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

Branch: refs/heads/develop
Commit: a46cc976efa5116607ac6d313a6e7586b61dcc26
Parents: 612a438
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Dec 2 09:50:28 2016 -0800
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Fri Dec 2 09:50:28 2016 -0800

----------------------------------------------------------------------
 .../internal/membership/InternalDistributedMember.java   | 11 +++++++++--
 .../geode/codeAnalysis/sanctionedDataSerializables.txt   |  6 +++---
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a46cc976/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
index 3404495..ae9b3c5 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
@@ -894,7 +894,10 @@ public class InternalDistributedMember implements DistributedMember,
Externaliza
     short version = netMbr.getVersionOrdinal();
     Version.writeOrdinal(out, version, true);
 
-    if (version >= Version.GFE_90.ordinal() && writeNetMbrData) {
+    Version streamVersion = InternalDataSerializer.getVersionForDataStream(out);
+    
+    if (streamVersion.ordinal() >= Version.GFE_90.ordinal() 
+        && version >= Version.GFE_90.ordinal() && writeNetMbrData) {
       getNetMember().writeAdditionalData(out);
     }
   }
@@ -991,7 +994,11 @@ public class InternalDistributedMember implements DistributedMember,
Externaliza
 
     // just in case this is just a non-versioned read
     // from a file we ought to check the version
-    if (version >= Version.GFE_90.ordinal() && (flags & NETMBR_DATA_BIT) ==
NETMBR_DATA_BIT) {
+    Version streamVersion = InternalDataSerializer.getVersionForDataStream(in);
+
+    if (streamVersion.ordinal() >= Version.GFE_90.ordinal()
+        && version >= Version.GFE_90.ordinal() 
+        && (flags & NETMBR_DATA_BIT) == NETMBR_DATA_BIT) {
       netMbr.readAdditionalData(in);
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a46cc976/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 844891d..aaba5fe 100644
--- a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -285,9 +285,9 @@ fromData,16,2a2bb700172a2bb900180100b50008b1
 toData,16,2a2bb700192b2ab40008b9001a0200b1
 
 org/apache/geode/distributed/internal/membership/InternalDistributedMember,4
-fromData,313,2bb8009f4d2bb900a001003e2a2bb8008fb500072ab2000499000e2c2ab40007b800a1a700072cb60008b500072bb900a2010036041504047e99000704a700040336051504057e99000704a700040336062a1504077e99000704a7000403b5003a2bb900a0010036072bb900a0010036082bb900a2010036092bb800913a0a02360b2bb8008f3a0c1509100da0000e2a2bb8008fb50014a700152bb8008f3a0d190dc6000a190db800a3360b2bb8008f3a0d2bb80092b60093360e190db600779e0011bb004f59190d150eb70050a70004013a0f2a15042bb700943610bb003159150715081509150b190c190a190fb700323a112a2c1d1505150615101911b80018b500012ab40001b9003e01009e000704a7000403b800471510b20095b60078a10017150410107e1010a0000d2ab400012bb900960200b1
-fromDataPre_GFE_7_1_0_0,282,2bb8009f4d2bb900a001003e2a2bb8008fb500072ab2000499000e2c2ab40007b800a1a700072cb60008b500072bb900a2010036041504047e99000704a700040336051504057e99000704a700040336062a1504077e99000704a7000403b5003a2bb900a0010036072bb900a0010036082bb900a2010036092bb800913a0a02360b2bb8008f3a0c1509100da0000e2a2bb8008fb50014a700152bb8008f3a0d190dc6000a190db800a3360b2bb8008f3a0d2bb80092b60093360e190db600779e0011bb004f59190d150eb70050a70004013a0f2a15042bb700943610bb003159150715081509150b190c190a190fb700323a112a2c1d1505150615101911b80018b500012ab40001b9003e01009e000704a7000403b80047b1
-toData,313,2ab600592bb800992b2ab60058b9009a02002ab400072bb80082033d2ab40001b9008301009900071c04803d2ab40001b9007301009900071c05803d2ab4003a9900071c07803d1c1008803d2ab40001b9009b01003e1d9900081c1010803d2b1c1100ff7e91b9009c02002b2ab40001b9003d0100b9009a02002b2ab40001b9004b0100b9009a02002ab40001b9003e010036042b1504b9009c02002ab40001b9004001002bb800852ab40001b9004c01002bb800821504100da0000e2ab400142bb80082a700132ab40001b9003f0100b8009d2bb800822ab40001b9004e01003a051905c70008124da700081905b600862bb800821905c7000911012ca700081905b60087b800882bb800892ab40001b90019010036062b150604b8008a1506b20095b60078a100111d99000d2ab6009e2bb9008b0200b1
+fromData,333,2bb800a04d2bb900a101003e2a2bb8008fb500072ab2000499000e2c2ab40007b800a2a700072cb60008b500072bb900a3010036041504047e99000704a700040336051504057e99000704a700040336062a1504077e99000704a7000403b5003a2bb900a1010036072bb900a1010036082bb900a3010036092bb800913a0a02360b2bb8008f3a0c1509100da0000e2a2bb8008fb50014a700152bb8008f3a0d190dc6000a190db800a4360b2bb8008f3a0d2bb80092b60093360e190db600779e0011bb004f59190d150eb70050a70004013a0f2a15042bb700943610bb003159150715081509150b190c190a190fb700323a112a2c1d1505150615101911b80018b500012ab40001b9003e01009e000704a7000403b800472bb800a53a121912b60078b20095b60078a100221510b20095b60078a10017150410107e1010a0000d2ab400012bb900960200b1
+fromDataPre_GFE_7_1_0_0,282,2bb800a04d2bb900a101003e2a2bb8008fb500072ab2000499000e2c2ab40007b800a2a700072cb60008b500072bb900a3010036041504047e99000704a700040336051504057e99000704a700040336062a1504077e99000704a7000403b5003a2bb900a1010036072bb900a1010036082bb900a3010036092bb800913a0a02360b2bb8008f3a0c1509100da0000e2a2bb8008fb50014a700152bb8008f3a0d190dc6000a190db800a4360b2bb8008f3a0d2bb80092b60093360e190db600779e0011bb004f59190d150eb70050a70004013a0f2a15042bb700943610bb003159150715081509150b190c190a190fb700323a112a2c1d1505150615101911b80018b500012ab40001b9003e01009e000704a7000403b80047b1
+toData,333,2ab600592bb800992b2ab60058b9009a02002ab400072bb80082033d2ab40001b9008301009900071c04803d2ab40001b9007301009900071c05803d2ab4003a9900071c07803d1c1008803d2ab40001b9009b01003e1d9900081c1010803d2b1c1100ff7e91b9009c02002b2ab40001b9003d0100b9009a02002b2ab40001b9004b0100b9009a02002ab40001b9003e010036042b1504b9009c02002ab40001b9004001002bb800852ab40001b9004c01002bb800821504100da0000e2ab400142bb80082a700132ab40001b9003f0100b8009d2bb800822ab40001b9004e01003a051905c70008124da700081905b600862bb800821905c7000911012ca700081905b60087b800882bb800892ab40001b90019010036062b150604b8008a2bb8009e3a071907b60078b20095b60078a1001c1506b20095b60078a100111d99000d2ab6009f2bb9008b0200b1
 toDataPre_GFE_7_1_0_0,271,2ab40001b9003e01009e000704a7000403b800472ab600592bb800992b2ab60058b9009a02002ab400072bb80082033d2ab40001b9008301009900071c04803d2ab40001b9007301009900071c05803d2ab4003a9900071c07803d2b1c1100ff7e91b9009c02002b2ab40001b9003d0100b9009a02002b2ab40001b9004b0100b9009a02002b2ab40001b9003e0100b9009c02002ab40001b9004001002bb800852ab40001b9004c01002bb800822ab40001b9003e01003e1d100da0000e2ab400142bb80082a700132ab40001b9003f0100b8009d2bb800822ab40001b9004e01003a041904c70008124da700081904b600862bb800821904c7000911012ca700081904b60087b800882bb80089b1
 
 org/apache/geode/distributed/internal/membership/NetView,2


Mime
View raw message