Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table meta data is not persisted as expected #34208

Open
RaigorJiang opened this issue Dec 30, 2024 · 1 comment
Open

Table meta data is not persisted as expected #34208

RaigorJiang opened this issue Dec 30, 2024 · 1 comment

Comments

@RaigorJiang
Copy link
Contributor

Question

Which version of ShardingSphere did you use?

5.5.2-SNAPSHOT f84f01a

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

When there are tables in the metadata in memory, the schema/tables in Zookeeper should also have table nodes.

Actual behavior

image
@Y-sir
Copy link

Y-sir commented Dec 31, 2024

I also found this problem. The problem is that the tables in the SingleRuleConfiguration object created in the getMissedDefaultRuleBuilderMap method in DatabaseRulesBuilder are empty and have no data. Then, in the loadSpecifiedDataNode in the loadSpecifiedDataNodes method in SingleTableDataNodeLoader, it ends as indicated by the arrow in Figure 1. I tried to comment out if (!singleNode.isEmpty()) { in loadSpecifiedDataNodes in Figure 2 and replace the original singleNode object with entry.getValue() and put it in.

Figure 1
image

Figure 2
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants