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/07/17 10:38:18 UTC

[GitHub] [shardingsphere] Bingai077 opened a new issue, #19290: The logical database has disappeared

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

   Which version of ShardingSphere did you use?
   5.1.3 (helm cluster)
   
   Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   Expected behavior
   
   All logical databases has effected.
   
   Actual behavior
   Create and write node data(version,dataSources,rules) in ZooKeepper. Part of the old logical database has disappeared in ShardingSphere-Proxy.


-- 
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] koala775 commented on issue #19290: The logical database has disappeared

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

   In project,how do I use DistSQL with java code?


-- 
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 #19290: The logical database has disappeared

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

   Sorry, I don't understand what you mean by `default logical table`.
   
   [Here](https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/usage/sharding-rule/) is an example of creating a sharding table rule via DistSQL.


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   @RaigorJiang 
   I know the cause of the problem "The logical database has disappeared".
   When the rule configuration of one logical database is incomplete, all other logical database disappear.
   Such as:
   
   create database ds;
   use ds;
   
   ```
   ADD RESOURCE ds_abc (
       HOST=192.168.0.1,
       PORT=3306,
       DB=ds_abc,
       USER=root,
       PASSWORD=123456
   );
   
   ADD RESOURCE ds_bcd (
       HOST=192.168.0.1,
       PORT=3306,
       DB=ds_bcd,
       USER=root,
       PASSWORD=123456
   );
   
   CREATE SHARDING ALGORITHM database_inline (
   	TYPE(NAME=inline,PROPERTIES("algorithm-expression"="ds_${tenant_code}"))
   );
   
   CREATE DEFAULT SHARDING DATABASE STRATEGY (
   	TYPE = standard,SHARDING_COLUMN=tenant_code,SHARDING_ALGORITHM=database_inline
   );
   
   ==================================================================
   CREATE SHARDING TABLE RULE order_test (
   	datanodes("ds_${['abc','bcd']}.order_test")
   )
   
   CREATE SHARDING TABLE RULE user_test (
   	datanodes("ds_${['abc','bcd']}.user_test")
   )
   ```
   This occurs when the rules for the logical table have not been configured.
   
   


-- 
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 #19290: The logical database has disappeared

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

   <img width="799" alt="image" src="https://user-images.githubusercontent.com/5668787/181068507-d39951ab-a7d2-4541-a9a3-4d7f872d2bf9.png">
   
   Version 5.1.2, I can't reproduce the problem you described.


-- 
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 #19290: The logical database has disappeared

Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #19290: The logical database has disappeared
URL: https://github.com/apache/shardingsphere/issues/19290


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   Does DistSql support concurrent manipulation of logical resources?
   For example, one thread adds a logical database resource and another thread modifies another logical database resource.
   
   Will the same happen with DistSql? refer to  https://community.sphere-ex.com/t/topic/1053
   


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   No, I just want to shard the database, not the table.  Different databases , all table structures are identical.


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   My demand is the same as this demand, refer to  https://community.sphere-ex.com/t/topic/1024


-- 
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 #19290: The logical database has disappeared

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

   DistSQL provides an API for managing ShardingSphere configuration, which has been carefully designed and tested, and also has validation logic during execution.
   However, directly modifying the ZK node is not a supported method. There is no test case covering this scenario, which is not recommended.


-- 
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 #19290: The logical database has disappeared

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

   So, this issue is not clearly described (including the screenshot you provided), and it doesn't match the title.
   
   I suggest you change the title and clarify the content, or submit another issue.
   
   In addition, if you want to ask how to write DistSQL, please provide the complete YAML configuration, an incomplete screenshot cannot provide complete information.


-- 
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 #19290: The logical database has disappeared

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

   You might want to take a look at the example, which can be of practical help:
   https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example/single-feature-example/sharding-example/sharding-spring-boot-mybatis-example/src/main/resources


-- 
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 #19290: The logical database has disappeared

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

   @koala775 So it should not be the same problem, please describe your problem and how to reproduce it in detail, thanks!


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   What's the difference between writing directly to ZooKeeper and DistSql?


-- 
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] terrymanu commented on issue #19290: The logical database has disappeared

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

   What is the configuration?


-- 
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 #19290: The logical database has disappeared

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

   The schema version is used to switch metadata, such as scaling, DistSQL will not directly change the schema version, which is determined by the governance feature.


-- 
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 #19290: The logical database has disappeared

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

   If your application uses JDBC, it needs to be deployed with Proxy for hybrid architecture, and then **send DistSQL to Proxy**.
   
   DistSQL https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/
   Hybrid Architecture https://shardingsphere.apache.org/document/current/en/overview/#hybrid-architecture


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   @RaigorJiang 
   How to configure the default logical table use DistSQL?
   Such as:
   ![image](https://user-images.githubusercontent.com/51192624/180422272-86a4e032-ca21-4f09-82d1-ea41989b14cd.png)
   


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   Ok, thank you. Let's try it. How does DistSQL change the schema version?


-- 
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] koala775 commented on issue #19290: The logical database has disappeared

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

   I also have this problem,do you have resolved ?


-- 
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] koala775 commented on issue #19290: The logical database has disappeared

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

   version:5.1.2 ShardingSphere-proxy.Not use helm .


-- 
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 #19290: The logical database has disappeared

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

   @Bingai077 
   DistSQL of course supports it, and your version may be incorrect, because I can't see several built-in databases like 'mysql', 'information_schema' from the results of `show databases`


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   The value of actualDataNodes is not required. How to do this with DistSQL?
   ![image](https://user-images.githubusercontent.com/51192624/180680201-a064654d-87d2-46bb-8664-238ac77db85f.png)
   


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   Please create more logical databases, I mean other logical databases disappear, `ds` will not disappear.


-- 
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 #19290: The logical database has disappeared

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

   OK, I understand.
   The problem has been fixed in the master branch. You can build Proxy from master, or refer to this issue  #19461.


-- 
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 #19290: The logical database has disappeared

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

   Hi @koala775 , what's your version of ShardingSphere, Do you use helm too?


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   Okay, 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] RaigorJiang commented on issue #19290: The logical database has disappeared

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

   
   > I generate datasource and rule yml text and push them to zookeeper .When I push next logic db and it's work,but the pre doesn‘t work. It throw a exception:Unknow database.Only last push logic db and work.
   
   Modifying governance data directly is not supported by ShardingSphere, please use YAML file or DistSQL


-- 
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] koala775 commented on issue #19290: The logical database has disappeared

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

   I generate datasource and rule yml text and push them to zookeeper .When I push next logic db and it's work,but the pre doesn‘t work. It throw a exception:Unknow database.Only last push logic db and work.


-- 
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] Bingai077 commented on issue #19290: The logical database has disappeared

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

   ![image](https://user-images.githubusercontent.com/51192624/179431984-ac7ba073-8118-4797-96c8-4ea2d6e05e67.png)
   
   for this,the node configuration is the same as in DistSql.


-- 
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 #19290: The logical database has disappeared

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

   @Bingai077 
   Did you mean `Sharding Broadcast Table` ? 
   https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/


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