You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/05/08 03:37:12 UTC

[GitHub] [shardingsphere] wenjixi opened a new issue #10280: why proxy not support ddl sql in xa transaction

wenjixi opened a new issue #10280:
URL: https://github.com/apache/shardingsphere/issues/10280


   ```java
   coordinator.database.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine
   
      @Override
       public void checkExecutePrerequisites(final ExecutionContext executionContext) {
           if (isExecuteDDLInXATransaction(executionContext.getSqlStatementContext().getSqlStatement())) {
               throw new TableModifyInTransactionException(getTableName(executionContext.getSqlStatementContext()));
           }
       }
   
    private boolean isExecuteDDLInXATransaction(final SQLStatement sqlStatement) {
           TransactionStatus transactionStatus = backendConnection.getTransactionStatus();
           return TransactionType.XA == transactionStatus.getTransactionType()
                   && sqlStatement instanceof DDLStatement
                   && transactionStatus.isInTransaction();
       }
   ```
   when i use ,it throw exception
   
   ```java
   coordinator.database.exception.TableModifyInTransactionException
   	at coordinator.database.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.checkExecutePrerequisites(JDBCExecuteEngine.java:79)
   	at coordinator.database.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:96)
   	at coordinator.database.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:74)
   	at coordinator.database.text.query.QueryBackendHandler.execute(QueryBackendHandler.java:54)
   	at coordinator.provider.postgresql.command.query.text.PostgreSQLComQueryExecutor.execute(PostgreSQLComQueryExecutor.java:73)
   	at coordinator.provider.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:108)
   	at coordinator.provider.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   ```
   ```
   
   


-- 
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:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang closed issue #10280: why proxy not support ddl sql in xa transaction

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #10280:
URL: https://github.com/apache/shardingsphere/issues/10280


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #10280: why proxy not support ddl sql in xa transaction

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #10280:
URL: https://github.com/apache/shardingsphere/issues/10280#issuecomment-927324978


   Since this issue has been inactive for more than 30 days, we will close it. 
   If you still have related questions, please submit a new issue, thank you.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] menghaoranss commented on issue #10280: why proxy not support ddl sql in xa transaction

Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #10280:
URL: https://github.com/apache/shardingsphere/issues/10280#issuecomment-839490252


   `DDL` can not be rolled back, will destroy the highly consistency of XA


-- 
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:
users@infra.apache.org