You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "richard3356 (via GitHub)" <gi...@apache.org> on 2025/06/07 06:37:24 UTC
[I] 使用shardingsphere proxy做读写分离,新增的表能看到,但是旧的数据库的表却看不到?什么原因导致的?怎么解决? [shardingsphere]
richard3356 opened a new issue, #35626:
URL: https://github.com/apache/shardingsphere/issues/35626
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
### Expected behavior
### Actual behavior
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
### Example codes for reproduce this issue (such as a github link).
--
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
Re: [I] 使用shardingsphere proxy做读写分离,新增的表能看到,但是旧的数据库的表却看不到?什么原因导致的?怎么解决? [shardingsphere]
Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o commented on issue #35626:
URL: https://github.com/apache/shardingsphere/issues/35626#issuecomment-2964683386
English only. In addition, for this kind of question, it is best to provide your current configuration information so that we can better analyze the problem and help 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
Re: [I] 使用shardingsphere proxy做读写分离,新增的表能看到,但是旧的数据库的表却看不到?什么原因导致的?怎么解决? [shardingsphere]
Posted by "zyxy2004 (via GitHub)" <gi...@apache.org>.
zyxy2004 commented on issue #35626:
URL: https://github.com/apache/shardingsphere/issues/35626#issuecomment-2961488130
Possible Causes
1. Metadata Loading Issue
ShardingSphere - Proxy loads metadata on startup. If old tables weren’t properly scanned (e.g., initial config missed their schemas) or metadata cache isn’t updated, Proxy fails to recognize them.
2. Configuration Error
Read - write splitting rules (e.g., data source mapping, table - routing policies) might not include old tables. If rules only cover new tables, Proxy can’t route/load old ones.
3. Permission Problem
The database user for Proxy lacks access rights to old tables. If the user only has permissions for new tables, Proxy can’t fetch old table metadata.
Solutions
1. Metadata Fix
Restart ShardingSphere - Proxy to trigger metadata reload. Check configs (e.g., metadata settings) to ensure old table schemas are included.
Use SQL/management APIs (if supported) to manually refresh metadata cache.
2. Configuration Check
Verify read - write splitting rules (e.g., config - sharding.yaml ). Ensure old tables are covered in data source mappings and routing policies.
Confirm data source configs include databases with old tables and connections work.
3. Permission Fix
Log in to the database with Proxy’s user. Test queries on old tables. Grant missing permissions (e.g., SELECT , SHOW TABLES ) if needed.
--
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
Re: [I] 使用shardingsphere proxy做读写分离,新增的表能看到,但是旧的数据库的表却看不到?什么原因导致的?怎么解决? [shardingsphere]
Posted by "yx9o (via GitHub)" <gi...@apache.org>.
yx9o closed issue #35626: 使用shardingsphere proxy做读写分离,新增的表能看到,但是旧的数据库的表却看不到?什么原因导致的?怎么解决?
URL: https://github.com/apache/shardingsphere/issues/35626
--
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