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/22 09:26:16 UTC

[GitHub] [shardingsphere] azexcy opened a new pull request, #18516: Improve scaling MySQLClient reconnect and add max retry times and support Interrupt.

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

   
   Changes proposed in this pull request:
   - Improve scaling increment task reconnect and add max retry times.
   - Scaling IT add stop/start scaling operation
   


-- 
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] sandynz merged pull request #18516: Improve scaling MySQLClient reconnect and add max retry times and support Interrupt.

Posted by GitBox <gi...@apache.org>.
sandynz merged PR #18516:
URL: https://github.com/apache/shardingsphere/pull/18516


-- 
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] sandynz commented on a diff in pull request #18516: Improve scaling MySQLClient reconnect and add max retry times and support Interrupt.

Posted by GitBox <gi...@apache.org>.
sandynz commented on code in PR #18516:
URL: https://github.com/apache/shardingsphere/pull/18516#discussion_r903520789


##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/MySQLClient.java:
##########
@@ -70,6 +71,10 @@ public final class MySQLClient {
     
     private ServerInfo serverInfo;
     
+    private volatile boolean running = true;
+    
+    private int reconnectTimes;

Review Comment:
   Maybe `reconnectTimes` need volatile too



##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java:
##########
@@ -72,6 +72,8 @@ public final class MySQLIncrementalDumper extends AbstractIncrementalDumper<Binl
     
     private final PipelineChannel channel;
     
+    private MySQLClient client;

Review Comment:
   client could be final, and also related fields.



##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java:
##########
@@ -198,5 +200,8 @@ private void pushRecord(final Record record) {
     
     @Override
     protected void doStop() {
+        if (null != client) {
+            client.closeChannel();

Review Comment:
   It's better to catch exception for `closeChannel()`



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/src/test/java/org/apache/shardingsphere/integration/data/pipeline/cases/general/MySQLGeneralScalingIT.java:
##########
@@ -84,6 +87,11 @@ public void assertManualScalingSuccess() throws InterruptedException {
         addTargetResource();
         executeWithLog(getCommonSQLCommand().getAutoAlterOrderWithItemShardingTableRule());
         String jobId = getScalingJobId();
+        Executors.newFixedThreadPool(1).execute(() -> {
+            ThreadUtil.sleep(8, TimeUnit.SECONDS);
+            executeWithLog(String.format("STOP SCALING %s", jobId));
+            executeWithLog(String.format("START SCALING %s", jobId));
+        });

Review Comment:
   Could be added later, after blocking response for START/STOP SCALING is done.



-- 
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 #18516: Improve scaling MySQLClient reconnect and add max retry times and support Interrupt.

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18516?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 [#18516](https://codecov.io/gh/apache/shardingsphere/pull/18516?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (689387f) into [master](https://codecov.io/gh/apache/shardingsphere/commit/9531b2222fa3b32c00570c13d339dd2327121890?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9531b22) will **increase** coverage by `0.00%`.
   > The diff coverage is `21.73%`.
   
   ```diff
   @@             Coverage Diff             @@
   ##             master   #18516     +/-   ##
   ===========================================
     Coverage     59.15%   59.16%             
     Complexity     2260     2260             
   ===========================================
     Files          3735     3735             
     Lines         54832    54846     +14     
     Branches       8017     9311   +1294     
   ===========================================
   + Hits          32438    32447      +9     
   - Misses        19651    19659      +8     
   + Partials       2743     2740      -3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/18516?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../pipeline/mysql/ingest/MySQLIncrementalDumper.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RhdGEvcGlwZWxpbmUvbXlzcWwvaW5nZXN0L015U1FMSW5jcmVtZW50YWxEdW1wZXIuamF2YQ==) | `72.22% <0.00%> (-1.65%)` | :arrow_down: |
   | [...data/pipeline/mysql/ingest/client/MySQLClient.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RhdGEvcGlwZWxpbmUvbXlzcWwvaW5nZXN0L2NsaWVudC9NeVNRTENsaWVudC5qYXZh) | `50.87% <25.00%> (-2.07%)` | :arrow_down: |
   | [...backend/text/transaction/TransactionXAHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L3RyYW5zYWN0aW9uL1RyYW5zYWN0aW9uWEFIYW5kbGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [.../admin/mysql/executor/MySQLSetCharsetExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2FkbWluL215c3FsL2V4ZWN1dG9yL015U1FMU2V0Q2hhcnNldEV4ZWN1dG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...nt/executor/SetReadwriteSplittingHintExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L2V4ZWN1dG9yL1NldFJlYWR3cml0ZVNwbGl0dGluZ0hpbnRFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...or/statement/impl/MySQLDCLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9teXNxbC92aXNpdG9yL3N0YXRlbWVudC9pbXBsL015U1FMRENMU3RhdGVtZW50U1FMVmlzaXRvci5qYXZh) | `43.51% <0.00%> (ø)` | |
   | [...jaeger/service/JaegerTracingPluginBootService.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tdHJhY2luZy9zaGFyZGluZ3NwaGVyZS1hZ2VudC10cmFjaW5nLWphZWdlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvcGx1Z2luL3RyYWNpbmcvamFlZ2VyL3NlcnZpY2UvSmFlZ2VyVHJhY2luZ1BsdWdpbkJvb3RTZXJ2aWNlLmphdmE=) | `68.42% <0.00%> (+5.26%)` | :arrow_up: |
   | [...ntracing/service/OpenTracingPluginBootService.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tdHJhY2luZy9zaGFyZGluZ3NwaGVyZS1hZ2VudC10cmFjaW5nLW9wZW50cmFjaW5nL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9hZ2VudC9wbHVnaW4vdHJhY2luZy9vcGVudHJhY2luZy9zZXJ2aWNlL09wZW5UcmFjaW5nUGx1Z2luQm9vdFNlcnZpY2UuamF2YQ==) | `69.23% <0.00%> (+7.69%)` | :arrow_up: |
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/18516/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `42.85% <0.00%> (+42.85%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18516?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/18516?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 [9531b22...689387f](https://codecov.io/gh/apache/shardingsphere/pull/18516?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