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/08/18 09:09:37 UTC

[GitHub] [shardingsphere] CodingBingo opened a new issue #11880: Question about logic table and actualTable

CodingBingo opened a new issue #11880:
URL: https://github.com/apache/shardingsphere/issues/11880


   
   Hi, this is bingo. These days, I am trying to use shardingsphere to replace mycat in our system.
   But I found a question about useing it. I have config a config-sharding-socialalbum.yaml, when I connect with mysql command line, and show tables, It shows not only what I configed in config file, but also actual table in my first datasource. I am pretty confused about this feature, if this is a feature, why not show actual tables in the second datasource. Hope any one who can explain the reason of this "feature", waiting for reply.
   ```yaml
   schemaName: social_album
   
   dataSources:
     ds_social_album:
       url: jdbc:mysql://*******:3306/feeds?serverTimezone=UTC&useSSL=false
       username:*****
       password:******
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
   - !SHARDING
     tables:
       social_album:
         actualDataNodes: ds_social_album.social_album_${(0..9).collect{t -> t.toString().padLeft(2, '0')}}
         databaseStrategy:
           none: true
         tableStrategy:
           standard:
             shardingColumn: route_key
             shardingAlgorithmName: social_album_tb_sharding
   
     shardingAlgorithms:
       social_album_tb_sharding:
         type: INLINE
         props:
           algorithm-expression: social_album_${(route_key % 10).toString().padLeft(2, '0')}
   ```


-- 
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] CodingBingo edited a comment on issue #11880: Question about logic table and actualTable

Posted by GitBox <gi...@apache.org>.
CodingBingo edited a comment on issue #11880:
URL: https://github.com/apache/shardingsphere/issues/11880#issuecomment-901655604


   Thanks for your reply, I am using the latest version of master branch. I am thinking about if shardingsphere only show the logic tables as we configured will be better to understand. In my company, our develop environment and test environment share physic mysql instance, and there's lots of tables which is not in use, show none-configured tables make use confused.


-- 
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] CodingBingo commented on issue #11880: Question about logic table and actualTable

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


   I think if there is a optional configuration that can control show none-configured tables will be better, I have did some modification in my local environment, if you think this is a acceptable modification, i will make a pull request. 


-- 
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] CodingBingo commented on issue #11880: Question about logic table and actualTable

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


   Thanks for your reply, I am using the latest version of master branch.


-- 
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] tristaZero commented on issue #11880: Question about logic table and actualTable

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


   Do you think we reach the consensus that non-configured tables do not include the actual tables? For instance,
   Suppose there are 3 tables, t, t_0 and t_1. And a logic table `t_logic` contains t_0 and t_1. The result of `show tables` will be
   ```
   t_logic
   t
   ```
   Right?
   


-- 
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] tristaZero commented on issue #11880: Question about logic table and actualTable

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


   @CodingBingo Right, that's the expectation. So you did not get the same result with 
   ```
   t_logic
   t
   ```?
   What's the result you got in this case?
   If not, It‘s not likely a bug.
   


-- 
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] tristaZero edited a comment on issue #11880: Question about logic table and actualTable

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #11880:
URL: https://github.com/apache/shardingsphere/issues/11880#issuecomment-904475571


   @CodingBingo Right, that's the expectation. So you did not get the same result with ?
   ```
   t_logic
   t
   ```
   
   What's the result you got in this case?
   If not, It‘s not likely a bug.
   


-- 
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] tristaZero commented on issue #11880: Question about logic table and actualTable

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


   HI @CodingBingo What's the version you are using? The latest one will only show the logic tables and other none-configured tables, as all the tables are in the control of ShardingSphere.


-- 
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] CodingBingo closed issue #11880: Question about logic table and actualTable

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


   


-- 
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] tristaZero edited a comment on issue #11880: Question about logic table and actualTable

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #11880:
URL: https://github.com/apache/shardingsphere/issues/11880#issuecomment-904475571


   @CodingBingo Right, that's the expectation. So you did not get the same result with ?
   ```
   t_logic
   t
   ```
   
   What's the result you got in this case?
   It‘s not likely a bug as we did many tests on this feature `show tables.`
   


-- 
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] CodingBingo commented on issue #11880: Question about logic table and actualTable

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


   > there
   
   yes,And I think if we don't configure t table, it shouldn't show in `show tables` command.


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