[ 
https://issues.apache.org/jira/browse/IGNITE-22768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Orlov updated IGNITE-22768:
--------------------------------------
    Fix Version/s: 3.0

> Sql. Worker node left the cluster before fragment has been sent
> ---------------------------------------------------------------
>
>                 Key: IGNITE-22768
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22768
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Evgeny Stanilovsky
>            Assignee: Konstantin Orlov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> It can happen that in mapping phase node still in topology, while a bit after 
> - already not, in such a case fragments will be send into non existing node 
> and exception will raised. Seems such situation need to be handled.
> This case affects only dml and read queries.
> 1. Implicit RO Tx - if no data have been send to the client, all remote 
> fragments need to be closed, tx rolled back, start from mapping phase (we 
> expect here that logical topology will be changed). Otherwise (rows are 
> partially send to the client) - informative exception need to be raised.
> 2. Implicit RW Tx - transaction need to be rolled back, start from mapping 
> phase (can rows can be partially sent to the client?).
> 3. Explicit Tx - non recoverable case, informative exception need to be 
> raised.
> Example of raised exception:
> {noformat}
> org.apache.ignite.sql.SqlException: IGN-CMN-65535 
> TraceId:3c6faf2a-863d-4342-83ec-0565c1049b2c Unable to send fragment 
> [targetNode=iinrt_t_1, fragmentId=1, cause=Recipient consistent ID cannot be 
> resolved: iinrt_t_1]
>       at 
> java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCauseInternal(ExceptionUtils.java:658)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:476)
>       at 
> org.apache.ignite.internal.client.sql.ClientSql.execute(ClientSql.java:100)
>       at 
> org.apache.ignite.internal.runner.app.ItIgniteNodeRestartTest.test0(ItIgniteNodeRestartTest.java:1133)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> Caused by: java.util.concurrent.CompletionException: 
> org.apache.ignite.sql.SqlException: IGN-CMN-65535 
> TraceId:3c6faf2a-863d-4342-83ec-0565c1049b2c Unable to send fragment 
> [targetNode=iinrt_t_1, fragmentId=1, cause=Recipient consistent ID cannot be 
> resolved: iinrt_t_1]
>       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:2094)
>       at 
> org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:428)
>       at 
> org.apache.ignite.internal.client.TcpClientChannel.lambda$onMessage$3(TcpClientChannel.java:247)
>       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:3c6faf2a-863d-4342-83ec-0565c1049b2c Unable to send fragment 
> [targetNode=iinrt_t_1, fragmentId=1, cause=Recipient consistent ID cannot be 
> resolved: iinrt_t_1]
>       at 
> java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils$1.copy(ExceptionUtils.java:789)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:723)
>       at 
> org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:525)
>       at 
> org.apache.ignite.internal.client.TcpClientChannel.readError(TcpClientChannel.java:519)
>       at 
> org.apache.ignite.internal.client.TcpClientChannel.processNextMessage(TcpClientChannel.java:406)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to