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

Vladimir Pligin updated IGNITE-25101:
-------------------------------------
    Description: 
{{Currently there is only one error code for access to a finished transaction. 
Looks impossible to distinguish if it was rolled back.}}
{code:java}
public static final int TX_ALREADY_FINISHED_ERR = 
TX_ERR_GROUP.registerErrorCode((short) 13);{code}
For example the exception (it's a RO transaction called from SQL layer):
{code:java}
Caused by: 
org.apache.ignite.internal.sql.engine.exec.RemoteFragmentExecutionException: 
IGN-TX-13 TraceId:95e939eb-e9a0-42dc-8aee-6fcbdc52ea8e Transaction is already 
finished () [txId=01961a63-27cf-0000-0642-127000000001, readOnly=true]. at 
org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:673)
 at 
org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$4(ExecutionServiceImpl.java:331)
 at 
org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:158)
 at 
org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$2(MessageServiceImpl.java:124)
 at 
org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:78)
 ... 3 more{code}
There is a method
{code:java}
isRolledBackWithTimeoutExceeded(){code}
in {{{*}_InternalTransaction_{*}, but it's unclear how to use it when you 
process the exception.}}

{{We have to add a way of getting information if a transaction was rolled back 
(and/or timed out).}}

  was:
{{Currently there is only one error code for access to a finished transaction. 
Looks impossible to distinguish if it was rolled back.}}

{code:java}
public static final int TX_ALREADY_FINISHED_ERR = 
TX_ERR_GROUP.registerErrorCode((short) 13);{code}
For example the exception (it's a RO transaction called from SQL layer):
{code:java}
Caused by: 
org.apache.ignite.internal.sql.engine.exec.RemoteFragmentExecutionException: 
IGN-TX-13 TraceId:95e939eb-e9a0-42dc-8aee-6fcbdc52ea8e Transaction is already 
finished () [txId=01961a63-27cf-0000-0642-127000000001, readOnly=true]. at 
org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:673)
 at 
org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$4(ExecutionServiceImpl.java:331)
 at 
org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:158)
 at 
org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$2(MessageServiceImpl.java:124)
 at 
org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:78)
 ... 3 more{code}
There is a method  {{}}
{code:java}
isRolledBackWithTimeoutExceeded(){code}
{{{}{}}}in {{{*}_InternalTransaction_{*}, but it's unclear how to use it.}}

{{We have to add a way of getting information if a transaction was rolled back 
(and/or timed out).}}


> add a separate error code for access to a rolled back transaction
> -----------------------------------------------------------------
>
>                 Key: IGNITE-25101
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25101
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladimir Pligin
>            Priority: Critical
>
> {{Currently there is only one error code for access to a finished 
> transaction. Looks impossible to distinguish if it was rolled back.}}
> {code:java}
> public static final int TX_ALREADY_FINISHED_ERR = 
> TX_ERR_GROUP.registerErrorCode((short) 13);{code}
> For example the exception (it's a RO transaction called from SQL layer):
> {code:java}
> Caused by: 
> org.apache.ignite.internal.sql.engine.exec.RemoteFragmentExecutionException: 
> IGN-TX-13 TraceId:95e939eb-e9a0-42dc-8aee-6fcbdc52ea8e Transaction is already 
> finished () [txId=01961a63-27cf-0000-0642-127000000001, readOnly=true]. at 
> org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:673)
>  at 
> org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$4(ExecutionServiceImpl.java:331)
>  at 
> org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:158)
>  at 
> org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$2(MessageServiceImpl.java:124)
>  at 
> org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:78)
>  ... 3 more{code}
> There is a method
> {code:java}
> isRolledBackWithTimeoutExceeded(){code}
> in {{{*}_InternalTransaction_{*}, but it's unclear how to use it when you 
> process the exception.}}
> {{We have to add a way of getting information if a transaction was rolled 
> back (and/or timed out).}}



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

Reply via email to