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 2022/09/23 08:49:35 UTC

[GitHub] [shardingsphere] atylbv9191 opened a new issue, #21154: Compatibility between sharding proxy XA transactions and liquidbase

atylbv9191 opened a new issue, #21154:
URL: https://github.com/apache/shardingsphere/issues/21154

   Sharding proxy version 5.1.2
   
   Server.xml configuration:
   
   mode:
    type: Cluster
    repository:
      type: ZooKeeper
      props:
        namespace: zk-fy
        server-lists: localhost:2181
        retryIntervalMilliseconds: 500
        timeToLiveSeconds: 60
        maxRetries: 3
        operationTimeoutMilliseconds: 500
    overwrite: false
   
   rules:
    - !AUTHORITY
      users:
        - root@%:xxxx
        - sharding@:sharding
      provider:
        type: ALL_PERMITTED
    - !TRANSACTION
      defaultType: local
      providerType: Atomikos
   
   ![image](https://user-images.githubusercontent.com/113484845/191922984-2d9fcdff-2d2a-45c5-b204-6308f1abde9f.png)
   
   The liquidbase link proxy startup service reported an error:
   
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.LockException: liquibase.exception.DatabaseException: Please do not modify the DATABASECHANGELOGLOCK table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. Although modifying it can lead to an inconsistent GTID state, if necessary you can modify it with a non-XA transaction. [Failed SQL: (3176) CREATE TABLE sharding_db.DATABASECHANGELOGLOCK (ID INT NOT NULL, `LOCKED` BIT(1) NOT NULL, LOCKGRANTED datetime NULL, LOCKEDBY VARCHAR(255) NULL, CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.12.jar:5.3.12]
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.12.jar:5.3.12]
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.5.6.jar:2.5.6]
   	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) [spring-boot-2.5.6.jar:2.5.6]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.5.6.jar:2.5.6]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) [spring-boot-2.5.6.jar:2.5.6]
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) [spring-boot-2.5.6.jar:2.5.6]
   	at com.ddl.ddl.DdlApplication.main(DdlApplication.java:10) [classes/:na]
   Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: Please do not modify the DATABASECHANGELOGLOCK table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. Although modifying it can lead to an inconsistent GTID state, if necessary you can modify it with a non-XA transaction. [Failed SQL: (3176) CREATE TABLE sharding_db.DATABASECHANGELOGLOCK (ID INT NOT NULL, `LOCKED` BIT(1) NOT NULL, LOCKGRANTED datetime NULL, LOCKEDBY VARCHAR(255) NULL, CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
   	at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:294) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:212) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Liquibase.lambda$update$1(Liquibase.java:220) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Scope.lambda$child$0(Scope.java:160) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Scope.child(Scope.java:169) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Scope.child(Scope.java:159) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Scope.child(Scope.java:138) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Liquibase.runInScope(Liquibase.java:2369) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Liquibase.update(Liquibase.java:217) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.Liquibase.update(Liquibase.java:203) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:321) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:275) ~[liquibase-core-4.3.5.jar:na]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.12.jar:5.3.12]
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.12.jar:5.3.12]
   	... 17 common frames omitted
   Caused by: liquibase.exception.DatabaseException: Please do not modify the DATABASECHANGELOGLOCK table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. Although modifying it can lead to an inconsistent GTID state, if necessary you can modify it with a non-XA transaction. [Failed SQL: (3176) CREATE TABLE sharding_db.DATABASECHANGELOGLOCK (ID INT NOT NULL, `LOCKED` BIT(1) NOT NULL, LOCKGRANTED datetime NULL, LOCKEDBY VARCHAR(255) NULL, CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
   	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:393) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:82) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:150) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:134) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.lockservice.StandardLockService.init(StandardLockService.java:101) ~[liquibase-core-4.3.5.jar:na]
   	at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:251) ~[liquibase-core-4.3.5.jar:na]
   	... 30 common frames omitted
   Caused by: java.sql.SQLException: Please do not modify the DATABASECHANGELOGLOCK table with an XA transaction. This is an internal system table used to store GTIDs for committed transactions. Although modifying it can lead to an inconsistent GTID state, if necessary you can modify it with a non-XA transaction.
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.29.jar:8.0.29]
   	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.29.jar:8.0.29]
   	at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763) ~[mysql-connector-java-8.0.29.jar:8.0.29]
   	at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.29.jar:8.0.29]
   	at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:633) ~[druid-1.1.20.jar:1.1.20]
   	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:389) ~[liquibase-core-4.3.5.jar:na]
   	... 35 common frames omitted
   
   
   What good solutions does sharding proxy have, or is there a recommended automated database version control tool?
   


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

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


[GitHub] [shardingsphere] github-actions[bot] closed issue #21154: Compatibility between sharding proxy XA transactions and liquidbase

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #21154: Compatibility between sharding proxy XA transactions and liquidbase
URL: https://github.com/apache/shardingsphere/issues/21154


-- 
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] github-actions[bot] commented on issue #21154: Compatibility between sharding proxy XA transactions and liquidbase

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #21154:
URL: https://github.com/apache/shardingsphere/issues/21154#issuecomment-1272348308

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] FlyingZC commented on issue #21154: Compatibility between sharding proxy XA transactions and liquidbase

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

   `nested exception is liquibase.exception.LockException: liquibase.exception.DatabaseException: Please do not modify the DATABASECHANGELOGLOCK table with an XA transaction`. 
   According to this error report, liquibase does not support the operation of DATABASECHANGELOGLOCK table within the xa transaction, I think this is not a issue of shardingsphere.Maybe you can try other transaction type.


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