We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version: 5.1.0 Class:org.apache.shardingsphere.sharding.route.engine.type.unicast.ShardingUnicastRoutingEngine
public RouteContext route(final ShardingRule shardingRule) { RouteContext result = new RouteContext(); String dataSourceName = getRandomDataSourceName(shardingRule.getDataSourceNames()); RouteMapper dataSourceMapper = new RouteMapper(dataSourceName, dataSourceName); if (shardingRule.isAllBroadcastTables(logicTables)) { List<RouteMapper> tableMappers = new ArrayList<>(logicTables.size()); for (String each : logicTables) { tableMappers.add(new RouteMapper(each, each)); } result.getRouteUnits().add(new RouteUnit(dataSourceMapper, tableMappers)); } else if (logicTables.isEmpty()) { result.getRouteUnits().add(new RouteUnit(dataSourceMapper, Collections.emptyList())); } else if (1 == logicTables.size()) { String logicTableName = logicTables.iterator().next(); if (!shardingRule.findTableRule(logicTableName).isPresent()) { result.getRouteUnits().add(new RouteUnit(dataSourceMapper, Collections.emptyList())); return result; } DataNode dataNode = shardingRule.getDataNode(logicTableName); result.getRouteUnits().add(new RouteUnit(new RouteMapper(dataNode.getDataSourceName(), dataNode.getDataSourceName()), Collections.singletonList(new RouteMapper(logicTableName, dataNode.getTableName())))); } else { routeWithMultipleTables(result, shardingRule); } return result; }
shardingRule.getDataNode method Class:org.apache.shardingsphere.sharding.rule.ShardingRule
public DataNode getDataNode(final String logicTableName) { TableRule tableRule = getTableRule(logicTableName); return tableRule.getActualDataNodes().get(0); }
Directly get (0) here If I choose one, the results of my query will not be correct. Should I return all the actual nodes here?
The text was updated successfully, but these errors were encountered:
What is the purpose of the AlwaysFalseSharingConditionValue design?
Sorry, something went wrong.
fix apache#29005
fcc1cf9
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Successfully merging a pull request may close this issue.
Version: 5.1.0
Class:org.apache.shardingsphere.sharding.route.engine.type.unicast.ShardingUnicastRoutingEngine
shardingRule.getDataNode method
Class:org.apache.shardingsphere.sharding.rule.ShardingRule
Directly get (0) here
If I choose one, the results of my query will not be correct. Should I return all the actual nodes here?
The text was updated successfully, but these errors were encountered: