[ https://issues.apache.org/jira/browse/GEODE-8687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17238681#comment-17238681 ]
ASF GitHub Bot commented on GEODE-8687: --------------------------------------- mkevo commented on a change in pull request #5730: URL: https://github.com/apache/geode/pull/5730#discussion_r530290653 ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQAutoSerializer.java ########## @@ -0,0 +1,289 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import static org.apache.geode.cache.Region.SEPARATOR; +import static org.apache.geode.test.awaitility.GeodeAwaitility.await; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.io.Serializable; +import java.util.Map; +import java.util.Objects; + +import com.google.common.collect.ImmutableMap; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ClientCache; +import org.apache.geode.cache.client.ClientRegionFactory; +import org.apache.geode.cache.client.ClientRegionShortcut; +import org.apache.geode.cache.client.internal.PoolImpl; +import org.apache.geode.cache.query.CqAttributesFactory; +import org.apache.geode.cache.query.CqQuery; +import org.apache.geode.cache.query.QueryService; +import org.apache.geode.internal.cache.CacheServerImpl; +import org.apache.geode.pdx.ReflectionBasedAutoSerializer; +import org.apache.geode.pdx.internal.AutoSerializableManager; +import org.apache.geode.test.dunit.Invoke; +import org.apache.geode.test.dunit.rules.ClientVM; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.junit.categories.ClientSubscriptionTest; +import org.apache.geode.test.junit.categories.SerializationTest; +import org.apache.geode.test.junit.rules.GfshCommandRule; + +@Category({ClientSubscriptionTest.class, SerializationTest.class}) +public class DurableClientCQAutoSerializer implements Serializable { + private static final String REPLICATE_REGION_NAME = "ReplicateRegion"; + private static final String PARTITION_REGION_NAME = "PartitionRegion"; + + private MemberVM server; + private MemberVM server2; + private MemberVM locator; + private ClientVM client; + private ClientVM client2; + + private static TestAutoSerializerCqListener cqListener = null; + + private static final String TEST_OBJECT1_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject1"; + private static final String TEST_OBJECT2_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject2"; + private static final String TEST_FAULTY_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject2Faulty"; + private static final String DURABLE_CLIENT_ID = "durableClient"; + + // Traffic data + static final Map<String, TestAutoSerializerObject1> LIST_TEST_OBJECT1 = ImmutableMap.of( + "key1", new TestAutoSerializerObject1("aa", "bb", 300), + "key2", new TestAutoSerializerObject1("aa", "bb", 600), + "key3", new TestAutoSerializerObject1("aaa", "bbb", 500)); + + static final Map<String, TestAutoSerializerObject2> LIST_TEST_OBJECT2 = ImmutableMap.of( + "key1", new TestAutoSerializerObject2("cc", "ddd", 300), + "key2", new TestAutoSerializerObject2("cc", "dddd", 400)); + + @Rule + public GfshCommandRule gfsh = new GfshCommandRule(); + + @Rule + public ClusterStartupRule cluster = new ClusterStartupRule(5); + + @Before + public void setUp() throws Exception { + Invoke.invokeInEveryVM( + () -> System.setProperty(AutoSerializableManager.NO_HARDCODED_EXCLUDES_PARAM, "true")); + + locator = + cluster.startLocatorVM(0); + int locatorPort = locator.getPort(); + server = cluster.startServerVM(1, + s -> s.withConnectionToLocator(locatorPort)); + + server2 = cluster.startServerVM(2, + s -> s.withConnectionToLocator(locatorPort)); + + gfsh.connectAndVerify(locator); + gfsh.executeAndAssertThat( + "configure pdx --auto-serializable-classes='" + TEST_OBJECT1_CLASS_PATH + ", " + + TEST_OBJECT2_CLASS_PATH + "'") + .statusIsSuccess(); + gfsh.executeAndAssertThat("create region --name=" + REPLICATE_REGION_NAME + " --type=REPLICATE") + .statusIsSuccess(); + gfsh.executeAndAssertThat("create region --name=" + PARTITION_REGION_NAME + " --type=PARTITION") + .statusIsSuccess(); + + locator.invoke(() -> { + ClusterStartupRule.memberStarter + .waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + REPLICATE_REGION_NAME, 2); + ClusterStartupRule.memberStarter + .waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + PARTITION_REGION_NAME, 2); + }); + } + + @Test + public void correctClassPathsAutoSerializer() Review comment: Please change the test name. Something like _testcorrectClassPathsAutoSerializer_ ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQAutoSerializer.java ########## @@ -0,0 +1,289 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import static org.apache.geode.cache.Region.SEPARATOR; +import static org.apache.geode.test.awaitility.GeodeAwaitility.await; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.io.Serializable; +import java.util.Map; +import java.util.Objects; + +import com.google.common.collect.ImmutableMap; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ClientCache; +import org.apache.geode.cache.client.ClientRegionFactory; +import org.apache.geode.cache.client.ClientRegionShortcut; +import org.apache.geode.cache.client.internal.PoolImpl; +import org.apache.geode.cache.query.CqAttributesFactory; +import org.apache.geode.cache.query.CqQuery; +import org.apache.geode.cache.query.QueryService; +import org.apache.geode.internal.cache.CacheServerImpl; +import org.apache.geode.pdx.ReflectionBasedAutoSerializer; +import org.apache.geode.pdx.internal.AutoSerializableManager; +import org.apache.geode.test.dunit.Invoke; +import org.apache.geode.test.dunit.rules.ClientVM; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.junit.categories.ClientSubscriptionTest; +import org.apache.geode.test.junit.categories.SerializationTest; +import org.apache.geode.test.junit.rules.GfshCommandRule; + +@Category({ClientSubscriptionTest.class, SerializationTest.class}) +public class DurableClientCQAutoSerializer implements Serializable { Review comment: Please rename this file to be clear that it is the test. Something like _DurableClientCQAutoSerializerDUnitTest_ ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQAutoSerializer.java ########## @@ -0,0 +1,289 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import static org.apache.geode.cache.Region.SEPARATOR; +import static org.apache.geode.test.awaitility.GeodeAwaitility.await; +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.io.Serializable; +import java.util.Map; +import java.util.Objects; + +import com.google.common.collect.ImmutableMap; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.ClientCache; +import org.apache.geode.cache.client.ClientRegionFactory; +import org.apache.geode.cache.client.ClientRegionShortcut; +import org.apache.geode.cache.client.internal.PoolImpl; +import org.apache.geode.cache.query.CqAttributesFactory; +import org.apache.geode.cache.query.CqQuery; +import org.apache.geode.cache.query.QueryService; +import org.apache.geode.internal.cache.CacheServerImpl; +import org.apache.geode.pdx.ReflectionBasedAutoSerializer; +import org.apache.geode.pdx.internal.AutoSerializableManager; +import org.apache.geode.test.dunit.Invoke; +import org.apache.geode.test.dunit.rules.ClientVM; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.junit.categories.ClientSubscriptionTest; +import org.apache.geode.test.junit.categories.SerializationTest; +import org.apache.geode.test.junit.rules.GfshCommandRule; + +@Category({ClientSubscriptionTest.class, SerializationTest.class}) +public class DurableClientCQAutoSerializer implements Serializable { + private static final String REPLICATE_REGION_NAME = "ReplicateRegion"; + private static final String PARTITION_REGION_NAME = "PartitionRegion"; + + private MemberVM server; + private MemberVM server2; + private MemberVM locator; + private ClientVM client; + private ClientVM client2; + + private static TestAutoSerializerCqListener cqListener = null; + + private static final String TEST_OBJECT1_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject1"; + private static final String TEST_OBJECT2_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject2"; + private static final String TEST_FAULTY_CLASS_PATH = + "org.apache.geode.internal.cache.tier.sockets.TestAutoSerializerObject2Faulty"; + private static final String DURABLE_CLIENT_ID = "durableClient"; + + // Traffic data + static final Map<String, TestAutoSerializerObject1> LIST_TEST_OBJECT1 = ImmutableMap.of( + "key1", new TestAutoSerializerObject1("aa", "bb", 300), + "key2", new TestAutoSerializerObject1("aa", "bb", 600), + "key3", new TestAutoSerializerObject1("aaa", "bbb", 500)); + + static final Map<String, TestAutoSerializerObject2> LIST_TEST_OBJECT2 = ImmutableMap.of( + "key1", new TestAutoSerializerObject2("cc", "ddd", 300), + "key2", new TestAutoSerializerObject2("cc", "dddd", 400)); + + @Rule + public GfshCommandRule gfsh = new GfshCommandRule(); + + @Rule + public ClusterStartupRule cluster = new ClusterStartupRule(5); + + @Before + public void setUp() throws Exception { + Invoke.invokeInEveryVM( + () -> System.setProperty(AutoSerializableManager.NO_HARDCODED_EXCLUDES_PARAM, "true")); + + locator = + cluster.startLocatorVM(0); + int locatorPort = locator.getPort(); + server = cluster.startServerVM(1, + s -> s.withConnectionToLocator(locatorPort)); + + server2 = cluster.startServerVM(2, + s -> s.withConnectionToLocator(locatorPort)); + + gfsh.connectAndVerify(locator); + gfsh.executeAndAssertThat( + "configure pdx --auto-serializable-classes='" + TEST_OBJECT1_CLASS_PATH + ", " + + TEST_OBJECT2_CLASS_PATH + "'") + .statusIsSuccess(); + gfsh.executeAndAssertThat("create region --name=" + REPLICATE_REGION_NAME + " --type=REPLICATE") + .statusIsSuccess(); + gfsh.executeAndAssertThat("create region --name=" + PARTITION_REGION_NAME + " --type=PARTITION") + .statusIsSuccess(); + + locator.invoke(() -> { + ClusterStartupRule.memberStarter + .waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + REPLICATE_REGION_NAME, 2); + ClusterStartupRule.memberStarter + .waitUntilRegionIsReadyOnExactlyThisManyServers(SEPARATOR + PARTITION_REGION_NAME, 2); + }); + } + + @Test + public void correctClassPathsAutoSerializer() + throws Exception { + + String query1 = "SELECT * FROM " + SEPARATOR + REPLICATE_REGION_NAME; + String query2 = "SELECT * FROM " + SEPARATOR + PARTITION_REGION_NAME; + + startDurableClient(TEST_OBJECT1_CLASS_PATH, TEST_OBJECT2_CLASS_PATH); + createDurableCQs(query1, query2); + verifyThatOnlyOneServerHostDurableSubscription(); + + // Start another client and provision data with traffic that should trigger CQs + startDataProvisionClient(TEST_OBJECT1_CLASS_PATH, TEST_OBJECT2_CLASS_PATH); + provisionRegionsWithData(); + + // Check that all events are received and successfully deserialized in cq listener + checkCqEvents(LIST_TEST_OBJECT1.size(), LIST_TEST_OBJECT2.size()); + verifyThatOnlyOneServerHostDurableSubscription(); + } + + @Test + public void faultyClassPathAutoSerializer() Review comment: The same as above. Something like _testfaultyClassPathAutoSerializer_ ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/TestAutoSerializerObject1.java ########## @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import java.util.Objects; + +import org.apache.geode.internal.PdxSerializerObject; + +/** + * <strong>Explicitly</strong> not serializable by java.io.Serializable, + * org.apache.geode.DataSerializable, or org.apache.geode.pdx.PdxSerializable. + */ +public class TestAutoSerializerObject1 implements PdxSerializerObject { + protected String data1; + protected String data2; + protected int numData3; + + public TestAutoSerializerObject1() { + this("", "", 0); + } + + protected TestAutoSerializerObject1(String data1, String data2, int numData3) { Review comment: Please change this _numData3_ to _numData_, also change get methods. ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/TestAutoSerializerObject1.java ########## @@ -0,0 +1,113 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import java.util.Objects; + +import org.apache.geode.internal.PdxSerializerObject; + +/** + * <strong>Explicitly</strong> not serializable by java.io.Serializable, + * org.apache.geode.DataSerializable, or org.apache.geode.pdx.PdxSerializable. + */ +public class TestAutoSerializerObject1 implements PdxSerializerObject { + protected String data1; + protected String data2; + protected int numData3; + + public TestAutoSerializerObject1() { + this("", "", 0); + } + + protected TestAutoSerializerObject1(String data1, String data2, int numData3) { + this.data1 = data1; + this.data2 = data2; + this.numData3 = numData3; + } + + public String getData1() { + return data1; + } + + public String getData2() { + return data2; + } + + public void setData2(String data2) { + this.data2 = data2; + } + + public int getNumData3() { + return numData3; + } + + public void setNumData3(int numData3) { + this.numData3 = numData3; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + if (data1 != null && !data1.isEmpty()) { + builder.append(data1); + builder.append(" ("); + + if (data2 != null && !data2.isEmpty()) { + if (0 < builder.length() && '(' != builder.charAt(builder.length() - 1)) { + builder.append(", "); + } + builder.append("data2: "); + builder.append(data2); + } + + if (0 < numData3) { + if (0 < builder.length() && '(' != builder.charAt(builder.length() - 1)) { + builder.append(", "); + } + builder.append("numData3: "); + builder.append(numData3); + } + + builder.append(")"); + } + return builder.toString(); + } + + @Override + public boolean equals(Object o) { + + if (this == o) + return true; + + if (o == null) + return false; + + if (getClass() != o.getClass()) Review comment: Can you merge this if statement with one above as they returning the same value? ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/TestAutoSerializerObject2.java ########## @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import java.util.Objects; + +import org.apache.geode.internal.PdxSerializerObject; + +/** + * <strong>Explicitly</strong> not serializable by java.io.Serializable, + * org.apache.geode.DataSerializable, or org.apache.geode.pdx.PdxSerializable. + */ +public class TestAutoSerializerObject2 implements PdxSerializerObject { + protected String data1; + protected String data2; + protected int numData3; + + public TestAutoSerializerObject2() { + this("", "", 0); + } + + protected TestAutoSerializerObject2(String data1, String data2, int numData3) { Review comment: Please change this _numData3_ to _numData_, also change get methods. ########## File path: geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/TestAutoSerializerObject2.java ########## @@ -0,0 +1,111 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal.cache.tier.sockets; + +import java.util.Objects; + +import org.apache.geode.internal.PdxSerializerObject; + +/** + * <strong>Explicitly</strong> not serializable by java.io.Serializable, + * org.apache.geode.DataSerializable, or org.apache.geode.pdx.PdxSerializable. + */ +public class TestAutoSerializerObject2 implements PdxSerializerObject { + protected String data1; + protected String data2; + protected int numData3; + + public TestAutoSerializerObject2() { + this("", "", 0); + } + + protected TestAutoSerializerObject2(String data1, String data2, int numData3) { + this.data1 = data1; + this.data2 = data2; + this.numData3 = numData3; + } + + public String getData1() { + return data1; + } + + public String getData2() { + return data2; + } + + public void setData2(String data2) { + this.data2 = data2; + } + + public int getNumData3() { + return numData3; + } + + public void setNumData3(int numData3) { + this.numData3 = numData3; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + if (data1 != null && !data1.isEmpty()) { + builder.append(data1); + builder.append(" ("); + + if (data2 != null && !data2.isEmpty()) { + if (0 < builder.length() && '(' != builder.charAt(builder.length() - 1)) { + builder.append(", "); + } + builder.append("data2: "); + builder.append(data2); + } + + if (0 < numData3) { + if (0 < builder.length() && '(' != builder.charAt(builder.length() - 1)) { + builder.append(", "); + } + builder.append("numData3: "); + builder.append(numData3); + } + + builder.append(")"); + } + return builder.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null) + return false; + + if (getClass() != o.getClass()) Review comment: Can you merge this if statement with one above as they returning the same value? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Durable client is continuously re-registering CQs on all servers when event > de-serialization fails causing resource exhaustion on servers > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: GEODE-8687 > URL: https://issues.apache.org/jira/browse/GEODE-8687 > Project: Geode > Issue Type: Bug > Components: client/server > Affects Versions: 1.13.0 > Reporter: Jakov Varenina > Assignee: Jakov Varenina > Priority: Major > Labels: pull-request-available > Attachments: deserialzationFault.log > > > When ReflectionBasedAutoSerializer is wrongly/not set it results with > serialization exception on client at the reception of the CQ events. > Serialization exception isn't logged which is misleading, and is hard to find > that actually ReflectionBasedAutoSerializer isn't set correctly. Only log > that can be seen is that client/servers subscription connections are closed > due to EOF. This is because client destroys subscriptions connections > intentionally, but doesn't log reason (PdxSerializationException) that led to > this. It would be good that serialization exceptions are logged as error or > warn. > Client destroys subscription connection and perform server fail-over whenever > serialization issue occurs. Additionally when subscription connection for > particular server fails multiple times then this server is put in deny list > for 10 seconds (this is configurable with {{ping-interval}}). After 10s > expire the server is removed from list and it is available for subscription > connection which will be destroyed again due serialization issue. This will > go indefinitely and approx. every 10s in this case the client subscribes to > each servers at least once. Due to serialization issue events aren't sent to > client and remain in subscription queues. > Whenever connection fails due to serialization issue and client is not > durable then subscription queue is closed and events are lost. > The biggest problem arises when client is durable. This is because > subscription queue remains on server for configurable period of time (e.g. > 300s) waiting for client to reconnect. When client perform fail-over to > another server it will create new subscription queue using initial image from > old queue that is currently paused. This means that all events from old queue > will be transferred to new subscription queue hosted by the current primary > server. This will happen on all servers and all of them will have copy of the > queue even subscription redundancy isn't configured. The problem here is that > client will periodically (every 10s in this case) establish connection to > each servers, so configured timeout (e.g. 300s) will never expire, but it > will be renewed each time client is registered. This could cause a lots of > problems since memory and disk usage (if overflow on queue is configured) > will increase on all servers. > You can find in attached logs for the problematic case with durable client : > vm0 -> locator > vm1, vm2 -> servers > vm3 -> durable client with enabled subscription handling CQ > events > vm4 -> client generating traffic that should trigger registered > CQ > -- This message was sent by Atlassian Jira (v8.3.4#803005)