You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2015/10/02 02:01:16 UTC
incubator-geode git commit: GEODE-77 IDs for old clients were
serializing with V9.0
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-77 92a67db37 -> a40121106
GEODE-77 IDs for old clients were serializing with V9.0
When a client cache ID was serialized by a 9.0 server to send to another
9.0 server the ID being transmitted was 9.0 instead of the clientVersion
instance variable. This caused EOFExceptions when deserializing a
message containing the ID.
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a4012110
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a4012110
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a4012110
Branch: refs/heads/feature/GEODE-77
Commit: a40121106df0208e137472d9702adeb69e5c7d0c
Parents: 92a67db
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Oct 1 17:00:51 2015 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Oct 1 17:00:51 2015 -0700
----------------------------------------------------------------------
.../internal/cache/tier/sockets/ClientProxyMembershipID.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a4012110/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
index 6b20fab..f318abd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
@@ -341,7 +341,7 @@ public final class ClientProxyMembershipID
// }
Version v = InternalDataSerializer.getVersionForDataStream(out);
if (v.compareTo(Version.GFE_90) >= 0) {
- Version.CURRENT.writeOrdinal(out, true);
+ clientVersion.writeOrdinal(out, true);
}
DataSerializer.writeByteArray(this.identity, out);
out.writeInt(this.uniqueId);
@@ -350,8 +350,10 @@ public final class ClientProxyMembershipID
public void fromData(DataInput in) throws IOException, ClassNotFoundException
{
this.clientVersion = InternalDataSerializer.getVersionForDataStream(in);
+
// client IDs are not always carefully serialized/deserialized so they
- // must know their own version
+ // must know their own version. If this ID was serialized with 9.0
+ // then it carries the version of the client
if (this.clientVersion.compareTo(Version.GFE_90) >= 0) {
this.clientVersion = Version.readVersion(in, false);
}