You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #33341, We temporarily removed the ShardingRouteAlgorithmException check logic to support storing different sharding tables in different database, but this may affect the normal check logic, for example: there is a problem with the sharding algorithm itself, resulting in routing to non-existent nodes.
A better way to support this is to refer to the existing autoTables usage and allow users to configure actualDataNodes. It is only necessary to ensure that the actual table name in actualDataNodes is globally unique, so that the sharding algorithm can directly find the corresponding database and table information based on actual table name. The traditional databaseStrategy and tableStrategy add more stringent configuration checks and do not allow irregular table sharding when it's under database sharding, because table sharding is based on database sharding logic.
In addition, one benefit I can think of from this change is that the actualDataNodes of the existing autoTables are automatically generated by ShardingRule. We can also consider maintaining the automatically generated actualDataNodes in the newly added API, so that the data distribution is known to users. On this basis, we can remove the standard sharding algorithm and the automatic sharding algorithm from the existing sharding algorithms, and all algorithms can be universal because they only need to route the actualDataNodes.
Yes, I am familiar with Autotables and have reviewed the documentation of ShardingSphere.
I plan to deepen my understanding of its functionality within ShardingSphere and I will begin working on this issue accordingly.
Hi @Yash-cor, this task is somewhat difficult. Are you familiar with the sharding feature?
@Yash-cor This sounds great, and you can organize the details of the code changes first, which will help ensure that you are working in the right direction.
@Yash-cor This sounds great, and you can organize the details of the code changes first, which will help ensure that you are working in the right direction.
Hello sorry for my late response I want to make sure that we have to keep actualDataSources and add the new 'actualDataNodes'
as if we delete actualDataSources it becomes similar configuration to normal sharding rule.
Feature Request
Is your feature request related to a problem?
#33341
Describe the feature you would like.
In #33341, We temporarily removed the
ShardingRouteAlgorithmException
check logic to support storing different sharding tables in different database, but this may affect the normal check logic, for example: there is a problem with the sharding algorithm itself, resulting in routing to non-existent nodes.A better way to support this is to refer to the existing autoTables usage and allow users to configure
actualDataNodes
. It is only necessary to ensure that the actual table name in actualDataNodes is globally unique, so that the sharding algorithm can directly find the corresponding database and table information based on actual table name. The traditionaldatabaseStrategy
andtableStrategy
add more stringent configuration checks and do not allow irregular table sharding when it's under database sharding, because table sharding is based on database sharding logic.The new configuration might look like this:
In addition, one benefit I can think of from this change is that the
actualDataNodes
of the existingautoTables
are automatically generated by ShardingRule. We can also consider maintaining the automatically generated actualDataNodes in the newly added API, so that the data distribution is known to users. On this basis, we can remove the standard sharding algorithm and the automatic sharding algorithm from the existing sharding algorithms, and all algorithms can be universal because they only need to route the actualDataNodes.For different sharding algorithm type, you can refer this doc - https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/sharding/
Tasks:
The text was updated successfully, but these errors were encountered: