This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git
commit 010065e76daab8afd66422c54217db4804785b6c Author: Jacob Barrett <[email protected]> AuthorDate: Sat Jan 16 14:35:06 2021 -0800 GEODE-8870: Removes GFE_6622. --- .../cache/persistence/DiskInitFileParser.java | 2 +- .../cache/tier/sockets/CacheClientNotifier.java | 27 +++++++++------------- .../cache/tier/sockets/ClientPingMessageImpl.java | 15 +----------- .../geode/internal/serialization/KnownVersion.java | 7 ------ 4 files changed, 13 insertions(+), 38 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskInitFileParser.java b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskInitFileParser.java index aa06390..623ee75 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskInitFileParser.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/persistence/DiskInitFileParser.java @@ -65,7 +65,7 @@ public class DiskInitFileParser { private transient boolean gotEOF; public DiskStoreID parse() throws IOException, ClassNotFoundException { - KnownVersion gfversion = KnownVersion.GFE_6622; + KnownVersion gfversion = KnownVersion.GFE_70; DiskStoreID result = null; boolean endOfFile = false; while (!(endOfFile || dis.atEndOfFile())) { diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java index 7f4fe13..da3c345 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientNotifier.java @@ -1870,23 +1870,18 @@ public class CacheClientNotifier { // Determine clients to ping for (CacheClientProxy proxy : getClientProxies()) { logger.debug("Checking whether to ping {}", proxy); - // Ping clients whose version is GE 6.6.2.2 - if (proxy.getVersion().isNotOlderThan(KnownVersion.GFE_6622)) { - // Send the ping message directly to the client. Do not qo through - // the queue. If the queue were used, the secondary connection would - // not be pinged. Instead, pings would just build up in secondary - // queue and never be sent. The counter is used to help scalability. - // If normal messages are sent by the proxy, then the counter will - // be reset and no pings will be sent. - if (proxy.incrementAndGetPingCounter() >= CLIENT_PING_TASK_COUNTER) { - logger.debug("Pinging {}", proxy); - proxy.sendMessageDirectly(message); - logger.debug("Done pinging {}", proxy); - } else { - logger.debug("Not pinging because not idle: {}", proxy); - } + // Send the ping message directly to the client. Do not qo through + // the queue. If the queue were used, the secondary connection would + // not be pinged. Instead, pings would just build up in secondary + // queue and never be sent. The counter is used to help scalability. + // If normal messages are sent by the proxy, then the counter will + // be reset and no pings will be sent. + if (proxy.incrementAndGetPingCounter() >= CLIENT_PING_TASK_COUNTER) { + logger.debug("Pinging {}", proxy); + proxy.sendMessageDirectly(message); + logger.debug("Done pinging {}", proxy); } else { - logger.debug("Ignoring because of version: {}", proxy); + logger.debug("Not pinging because not idle: {}", proxy); } } } diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientPingMessageImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientPingMessageImpl.java index cc74f0a..fc082c7 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientPingMessageImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientPingMessageImpl.java @@ -43,19 +43,6 @@ public class ClientPingMessageImpl implements ClientMessage { @Override public Message getMessage(CacheClientProxy proxy, boolean notify) throws IOException { - KnownVersion clientVersion = proxy.getVersion(); - Message message = null; - if (clientVersion.isNotOlderThan(KnownVersion.GFE_6622)) { - message = getGFEMessage(); - } else { - throw new IOException( - "Unsupported client version for server-to-client message creation: " + clientVersion); - } - - return message; - } - - protected Message getGFEMessage() throws IOException { Message message = new Message(0, KnownVersion.CURRENT); message.setMessageType(MessageType.SERVER_TO_CLIENT_PING); message.setTransactionId(0); @@ -106,7 +93,7 @@ public class ClientPingMessageImpl implements ClientMessage { @Override public void setLatestValue(Object value) { - return; + } @Override diff --git a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/KnownVersion.java b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/KnownVersion.java index 4796ef8..43415cd 100644 --- a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/KnownVersion.java +++ b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/KnownVersion.java @@ -62,13 +62,6 @@ public class KnownVersion extends AbstractVersion { public static final KnownVersion TOKEN = new KnownVersion("", "TOKEN", (byte) -1, (byte) 0, (byte) 0, (byte) 0, TOKEN_ORDINAL); - private static final short GFE_6622_ORDINAL = 18; - - @Immutable - @Deprecated - public static final KnownVersion GFE_6622 = - new KnownVersion("GFE", "6.6.2.2", (byte) 6, (byte) 6, (byte) 2, (byte) 2, GFE_6622_ORDINAL); - private static final short GFE_70_ORDINAL = 19; @Immutable
