Anatoli Karman created IGNITE-22584:
---------------------------------------
Summary: Cluster load balancing when the second node (non-CMG) is
killed doesn't work
Key: IGNITE-22584
URL: https://issues.apache.org/jira/browse/IGNITE-22584
Project: Ignite
Issue Type: Bug
Components: persistence, sql
Reporter: Anatoli Karman
*Steps to reproduce:*
# Start cluster with 2 nodes running locally.
# Make connection like this:
{code:java}
try (IgniteClient igniteClient = IgniteClient.builder().retryPolicy(new
RetryLimitPolicy()).addresses(thinClientEndpoints.toArray(new
String[]{"localhost:10800","localhost:10801"})).build()) {
try (Session session = igniteClient.sql().createSession()) {
//code here
}
} {code}
3. Create table with replication 2
4. Execute insert 1 row and select from the table.
5. Kill the second node (non-CMG)
6. Execute select from the table.
*Expected:*
Cluster works with one node.
*Actual:*
The exception on select after first node is killed, the select is not executed.
{code:java}
org.opentest4j.AssertionFailedError: Select after node is killed ==> Unexpected
exception thrown: org.apache.ignite.sql.SqlException: Unable to request next
batch: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection
refused: /172.120.6.2:3345
at
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
at
app//org.junit.jupiter.api.AssertDoesNotThrow.createAssertionFailedError(AssertDoesNotThrow.java:84)
at
app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:53)
at
app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:40)
at
app//org.junit.jupiter.api.Assertions.assertDoesNotThrow(Assertions.java:3183)
at
app//org.gridgain.ai3tests.tests.ConnectionAfterNodeIsKilledTest.testThinClientConnectionToMultipleHostAfter1NodeIsKilled(ConnectionAfterNodeIsKilledTest.java:128)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:566)
at
[email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
[email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
[email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at [email protected]/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.ignite.sql.SqlException: IGN-CMN-65535
TraceId:e1244baf-7528-40e5-aa3a-ec8306c4c41a Unable to request next batch:
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused:
/172.120.6.2:3345
at
[email protected]/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
at
app//org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
at
app//org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
at
app//org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
at
app//org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCauseInternal(ExceptionUtils.java:658)
at
app//org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:476)
at
app//org.apache.ignite.internal.client.sql.ClientSql.execute(ClientSql.java:102)
at
app//org.gridgain.ai3tests.tests.teststeps.ThinClientSteps.lambda$executeQuery$0(ThinClientSteps.java:64)
at app//io.qameta.allure.Allure.lambda$step$1(Allure.java:127)
at app//io.qameta.allure.Allure.step(Allure.java:181)
at app//io.qameta.allure.Allure.step(Allure.java:125)
at
app//org.gridgain.ai3tests.tests.teststeps.ThinClientSteps.executeQuery(ThinClientSteps.java:64)
at
app//org.gridgain.ai3tests.tests.TestUtils.selectAll(TestUtils.java:174)
at
app//org.gridgain.ai3tests.tests.ConnectionAfterNodeIsKilledTest.lambda$testThinClientConnectionToMultipleHostAfter1NodeIsKilled$0(ConnectionAfterNodeIsKilledTest.java:129)
at
app//org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:49)
... 8 more
Caused by: java.util.concurrent.CompletionException:
org.apache.ignite.sql.SqlException: IGN-CMN-65535
TraceId:e1244baf-7528-40e5-aa3a-ec8306c4c41a Unable to request next batch:
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused:
/172.120.6.2:3345
at
java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
at
java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
at
java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:870)
at
java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
at
java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at
java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
at
org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:426)
at
org.apache.ignite.internal.client.TcpClientChannel.lambda$onMessage$3(TcpClientChannel.java:245)
at
java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
at
java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at
java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at
java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at
java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at
java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: org.apache.ignite.sql.SqlException: IGN-CMN-65535
TraceId:e1244baf-7528-40e5-aa3a-ec8306c4c41a Unable to request next batch:
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused:
/172.120.6.2:3345
at
[email protected]/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
at
app//org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
at
app//org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
at
app//org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
at
app//org.apache.ignite.internal.client.TcpClientChannel.readError(TcpClientChannel.java:510)
at
app//org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:404)
... 7 more
{code}
**
--
This message was sent by Atlassian Jira
(v8.20.10#820010)