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

Closed
RaigorJiang opened this issue Dec 30, 2024 · 3 comments
Closed

Table meta data is not persisted as expected #34208

RaigorJiang opened this issue Dec 30, 2024 · 3 comments

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

@menghaoranss
Copy link
Contributor

fixed by #34236

@Y-sir
Copy link

Y-sir commented Jan 11, 2025

@RaigorJiang @menghaoranss Hello, I found that the table metadata does not exist when the encryption rules are created, but it does not exist when the sharding proxy is started. I remember that the previous versions would load the table metadata when they were first started. Could it be that the metadata loading mechanism of the new version has changed, and the table metadata will only be loaded when new encryption rules are added, and will not be loaded when it is started?

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

3 participants