terrymanu commented on issue #37767:
URL: 
https://github.com/apache/shardingsphere/issues/37767#issuecomment-3770992622

   • Problem Understanding
   
     - You run ShardingSphere-JDBC 5.4.1 with dynamic data sources and 
read/write splitting; logic DB cornerstone_user, readwrite DS readwrite_ds.
     - Single-table rule only sets defaultDataSource, no tables list.
     - You get Table or view *** does not exist and ask why, and whether 
there’s a better way to configure.
   
     Root Cause
   
     - Since 5.4.0, single tables are no longer auto-loaded; they must be 
explicitly loaded via YAML rules: - !SINGLE or DistSQL LOAD SINGLE TABLE ... 
(see FAQ “Table or view %s does not exist” in 
docs/document/content/faq/_index.cn.md).
     - check-table-metadata-enabled: false only disables metadata consistency 
checks; it does not load tables.
     - single.defaultDataSource applies only when executing CREATE TABLE for a 
single table; it does not replace the tables list (see 
docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/single.cn.md).
   
     Analysis
   
     - With tables empty, the framework has no single-table metadata; 
routing/binding fails and throws TableNotFoundException.
     - This is intended behavior to avoid the auto-scan issues removed in 5.4.x.
     - Coexistence of dynamic data sources and read/write splitting is fine 
once single tables are explicitly loaded.
   
     Conclusion
   
     - This is a configuration gap, not a product bug.
     - Align with standard usage: explicitly load the single tables you need 
(e.g., YAML rules: - !SINGLE\n  tables: ["*.*"] or targeted lists, or run LOAD 
SINGLE TABLE *.*; after storage units are registered).


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to