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/10/10 06:37:38 UTC

[GitHub] [shardingsphere] peilinqian opened a new issue, #19447: Errors may occur when refreshing metadata at the same time as a business request.

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

   ## Feature Request
   
   **For English only**, other languages will not accept.
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot make decision by current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Is your feature request related to a problem?
   When a transaction is in traffic routing ,at the same time traffic rules is modified by distsql,There is a possibility that the failure occurs.
   
   for example:
   transaction :
   
   	@Test
   	public void testTraffic_24_01() throws SQLException, InterruptedException {
   		String sql1 = "update  t_order SET  content='test11' where  user_id=11;";
   		String sql2 = "INSERT INTO t_order(user_id, content, creation_date) VALUES(11, 'test11', current_date);";
   		String sql3 = "delete from t_order where user_id=11;";
   		for (int i = 0; i < 1000; i++) {
   			setAutoCommit(false);
   			System.out.println("transaction:" + i + "start");
   			getStatement().executeUpdate(sql1);
   			getStatement().executeUpdate(sql2);
   			getStatement().executeUpdate(sql3);
   			TimeUnit.SECONDS.sleep(2);
   			commit();
   			System.out.println("transaction:" + i + "end");
   		}
   	}
   
   distsql:
   drop traffic rule transaction_traffic;
   create traffic rule transaction_traffic(labels(sharding1),
   traffic_algorithm(type(name=Proxy)),
   load_balancer(type(name=ROUND_ROBIN)));
   
   --Repeat alter tranffic rule
   alter traffic rule transaction_traffic(labels(sharding2),
   traffic_algorithm(type(name=Proxy)),
   load_balancer(type(name=ROUND_ROBIN)));
   show traffic rules;
   
   
   ### Describe the feature you would like.
   
   


-- 
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 #19447: Errors may occur when refreshing metadata at the same time as a business request.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #19447: Errors may occur when refreshing metadata at the same time as a business request.
URL: https://github.com/apache/shardingsphere/issues/19447


-- 
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 #19447: Errors may occur when refreshing metadata at the same time as a business request.

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

   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] RaigorJiang commented on issue #19447: Errors may occur when refreshing metadata at the same time as a business request.

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #19447:
URL: https://github.com/apache/shardingsphere/issues/19447#issuecomment-1407885713

   Actually the same reason as #17704.


-- 
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] peilinqian commented on issue #19447: Errors may occur when refreshing metadata at the same time as a business request.

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

   java.lang.IllegalStateException: Missing the data source name: '65aeebfb-2876-4ef2-9c29-1aef31f6b53b'
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:589)
   	at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.getConnections(ConnectionManager.java:298)
   	at org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine.group(DriverExecutionPrepareEngine.java:82)
   	at org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine.prepare(AbstractExecutionPrepareEngine.java:62)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createTrafficExecutionUnit(ShardingSphereStatement.java:443)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.executeUpdate(ShardingSphereStatement.java:223)
   	at com.feature.traffic.mytest.MyTrafficTest.testTraffic_14_03(MyTrafficTest.java:290)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
   	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
   


-- 
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 closed issue #19447: Errors may occur when refreshing metadata at the same time as a business request.

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #19447: Errors may occur when refreshing metadata at the same time as a business request.
URL: https://github.com/apache/shardingsphere/issues/19447


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