You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/29 16:07:59 UTC

[GitHub] [shardingsphere] cheese8 opened a new pull request, #18710: reduce sharding dataNodes on the same shardingStrategy - InlineShardingAlgorithm

cheese8 opened a new pull request, #18710:
URL: https://github.com/apache/shardingsphere/pull/18710

   For #18584.
   
   Changes proposed in this pull request:
   -reduce sharding dataNodes on the same shardingStrategy - InlineShardingAlgorithm
   


-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] cheese8 commented on pull request #18710: reduce sharding dataNodes on the same shardingStrategy - InlineShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
cheese8 commented on PR #18710:
URL: https://github.com/apache/shardingsphere/pull/18710#issuecomment-1171377664

   > The route logic is too important, we need more design. Why add Comparable for sharding algorithm, the proposal of code maybe need more clear.
   
   Yeah, the route logic indeed is the most important. 
   I reorganized the idea and logic of this proposal were listed as below:
   1、Now, route0 returned the Cartesian Product on the routedDataSources X the routedTables, then we got 4 dataNodes(ds0, table0 / ds0, table1 / ds1, table0/ ds1, table1) on routedDataSources(ds0, ds1) and routedTables(table0, table1) .
   
   2、As the original issue mentioned that, while the databaseShardingStrategy the same with the tableShardingStrategy, no matter what the shardingConditionValue provided, the return of the Cartesian Product on the routedDataSources X the routedTables should be broken and reduced, then we got 2 dataNodes(ds0, table0 / ds1, table1) on routedDataSources(ds0, ds1) and routedTables(table0, table1) in this case, in other words, the database and the table should route the same suffix index on the specified shardingConditionValue.
   
   3、how to judge the databaseShardingStrategy the same with the tableShardingStrategy?
   We should compare the databaseShardingStrategy to the tableShardingStrategy, only if they are(shardingColumn and shardingAlgorithm) not null, and shardingColumn and shardingAlgorithm are both equals, especially the algorithmExpression without prefix of the shardingAlgorithm are the same, the same judged, otherwise not the same judged.


-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] codecov-commenter commented on pull request #18710: reduce sharding dataNodes on the same shardingStrategy - InlineShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18710:
URL: https://github.com/apache/shardingsphere/pull/18710#issuecomment-1170828256

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18710](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (76b4b5b) into [master](https://codecov.io/gh/apache/shardingsphere/commit/b40c8e111b4342a0c20a791a375a4cb2d5fa111d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b40c8e1) will **decrease** coverage by `0.23%`.
   > The diff coverage is `59.09%`.
   
   > :exclamation: Current head 76b4b5b differs from pull request most recent head ebc2b30. Consider uploading reports for the commit ebc2b30 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18710      +/-   ##
   ============================================
   - Coverage     59.35%   59.12%   -0.24%     
   + Complexity     2262     2261       -1     
   ============================================
     Files          3743     3736       -7     
     Lines         54899    54291     -608     
     Branches       9343     9158     -185     
   ============================================
   - Hits          32586    32099     -487     
   + Misses        19565    19488      -77     
   + Partials       2748     2704      -44     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...shardingsphere/sharding/spi/ShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9zaGFyZGluZy9zcGkvU2hhcmRpbmdBbGdvcml0aG0uamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...e/sharding/checker/audit/ShardingAuditChecker.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvY2hlY2tlci9hdWRpdC9TaGFyZGluZ0F1ZGl0Q2hlY2tlci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...rdingsphere/infra/expr/InlineExpressionParser.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9leHByL0lubGluZUV4cHJlc3Npb25QYXJzZXIuamF2YQ==) | `89.61% <0.00%> (-4.92%)` | :arrow_down: |
   | [...e/model/privilege/DatabasePermittedPrivileges.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWF1dGhvcml0eS9zaGFyZGluZ3NwaGVyZS1hdXRob3JpdHktY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYXV0aG9yaXR5L3Byb3ZpZGVyL2RhdGFiYXNlL21vZGVsL3ByaXZpbGVnZS9EYXRhYmFzZVBlcm1pdHRlZFByaXZpbGVnZXMuamF2YQ==) | `25.00% <ø> (ø)` | |
   | [.../sql/common/statement/ddl/NotifyStmtStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3N0YXRlbWVudC9kZGwvTm90aWZ5U3RtdFN0YXRlbWVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...ialect/handler/ddl/DropSchemaStatementHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9oYW5kbGVyL2RkbC9Ecm9wU2NoZW1hU3RhdGVtZW50SGFuZGxlci5qYXZh) | `60.00% <ø> (ø)` | |
   | [.../postgresql/ddl/PostgreSQLNotifyStmtStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvZGlhbGVjdC9zdGF0ZW1lbnQvcG9zdGdyZXNxbC9kZGwvUG9zdGdyZVNRTE5vdGlmeVN0bXRTdGF0ZW1lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...ized/asserts/statement/ddl/DDLStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGRsL0RETFN0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../statement/ddl/impl/NotifyStmtStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvYXNzZXJ0cy9zdGF0ZW1lbnQvZGRsL2ltcGwvTm90aWZ5U3RtdFN0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <ø> (ø)` | |
   | [...rithm/sharding/inline/InlineShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvYWxnb3JpdGhtL3NoYXJkaW5nL2lubGluZS9JbmxpbmVTaGFyZGluZ0FsZ29yaXRobS5qYXZh) | `70.58% <40.00%> (-13.42%)` | :arrow_down: |
   | ... and [10 more](https://codecov.io/gh/apache/shardingsphere/pull/18710/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [d95dce8...ebc2b30](https://codecov.io/gh/apache/shardingsphere/pull/18710?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] cheese8 commented on pull request #18710: reduce sharding dataNodes on the same shardingStrategy - InlineShardingAlgorithm

Posted by GitBox <gi...@apache.org>.
cheese8 commented on PR #18710:
URL: https://github.com/apache/shardingsphere/pull/18710#issuecomment-1171392838

   > add Comparable for sharding algorithm
   
   add Comparable for sharding algorithm and set default implementation
   1、we should judge the sharding algorithm are the same or not.
   2、we can take InlineShardingAlgorithm for proposal.


-- 
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@shardingsphere.apache.org

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