You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/03/16 09:02:12 UTC

[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #10544: [Breaking Change] Enhance JDBC storage through merging table and managing day-based table rolling

kezhenxu94 commented on code in PR #10544:
URL: https://github.com/apache/skywalking/pull/10544#discussion_r1138324380


##########
oap-server/server-storage-plugin/storage-shardingsphere-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/shardingsphere/ShardingRulesOperator.java:
##########
@@ -157,23 +152,35 @@ private ShardingRule.ShardingRuleBuilder buildShardingRule(ShardingRule.Sharding
         buildDataNodes(builder, tableName, dataSources, ttl, currentDate);
         buildDatabaseStrategy(builder, dsShardingColumn, dataSources.size());
 
-        switch (shardingAlgorithm) {
-            case TIME_SEC_RANGE_SHARDING_ALGORITHM:
-                buildTimeRangeTableStrategy(builder, tableShardingColumn, TIME_SEC_RANGE_SHARDING_EXPRESSION);
-                break;
-            case TIME_MIN_RANGE_SHARDING_ALGORITHM:
-                buildTimeRangeTableStrategy(builder, tableShardingColumn, TIME_MIN_RANGE_SHARDING_EXPRESSION);
-                break;
-            case TIME_RELATIVE_ID_SHARDING_ALGORITHM:
-                buildExpressionTableStrategy(builder, tableName, tableShardingColumn,
-                                             TIME_RELATIVE_ID_SHARDING_EXPRESSION);
-                break;
-            case TIME_BUCKET_SHARDING_ALGORITHM:
-                buildExpressionTableStrategy(builder, tableName, tableShardingColumn, TIME_BUCKET_SHARDING_EXPRESSION);
-                break;
-            default:
-                throw new UnexpectedException("Unsupported sharding algorithm " + shardingAlgorithm);
-        }

Review Comment:
   > We don't need these anymore? But I don't see you remove them from the top of the Class code.
   
   Now removed.



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org