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/02/22 13:07:43 UTC
[GitHub] [shardingsphere] ReyYang opened a new pull request #15571: For #12449: If a scaling job failed or stopped then it could not be started by DistSQL except restarting proxy
ReyYang opened a new pull request #15571:
URL: https://github.com/apache/shardingsphere/pull/15571
Fixes #12449.
Changes proposed in this pull request:
- Provides stopJob methods for RuleAlteredJob to use
--
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 change in pull request #15571: For #12449: If a scaling job failed or stopped then it could not be started by DistSQL except restarting proxy
Posted by GitBox <gi...@apache.org>.
sandynz commented on a change in pull request #15571:
URL: https://github.com/apache/shardingsphere/pull/15571#discussion_r812507308
##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineJobExecutor.java
##########
@@ -105,6 +103,16 @@ private void execute(final JobConfigurationPOJO jobConfigPOJO) {
}
}
+ /**
+ * stop job.
+ * @param jobId job id
+ */
+ public void stopJob(final String jobId) {
+ log.info("remove and stop {}", jobId);
+ EXECUTING_JOBS.remove(jobId);
+ RuleAlteredJobSchedulerCenter.stop(jobId);
+ }
Review comment:
Looks `EXECUTING_JOBS` is not needed any more, could we just depend on `RuleAlteredJobSchedulerCenter.stop` and remove this new method.
##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJobWorker.java
##########
@@ -86,6 +87,9 @@
private static final AtomicBoolean WORKER_INITIALIZED = new AtomicBoolean(false);
+ @Getter
+ private static final PipelineJobExecutor PIPELINE_JOB_EXECUTOR = new PipelineJobExecutor();
+
Review comment:
It's not necessary to add `PIPELINE_JOB_EXECUTOR`.
##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJob.java
##########
@@ -53,7 +53,7 @@ public void execute(final ShardingContext shardingContext) {
} catch (final RuntimeException ex) {
// CHECKSTYLE:ON
log.error("job prepare failed, {}-{}", shardingContext.getJobName(), shardingContext.getShardingItem());
- jobContext.close();
+ RuleAlteredJobWorker.getPIPELINE_JOB_EXECUTOR().stopJob(shardingContext.getJobName());
Review comment:
If `jobContext.close();` removed, looks it might cause resource leak.
`RuleAlteredJobWorker.getPIPELINE_JOB_EXECUTOR().` could be replaced by `RuleAlteredJobSchedulerCenter.stop`.
##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineJobExecutor.java
##########
@@ -105,6 +103,16 @@ private void execute(final JobConfigurationPOJO jobConfigPOJO) {
}
}
+ /**
+ * stop job.
Review comment:
Illegal javadoc format.
--
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 #15571: For #12449: If a scaling job failed or stopped then it could not be started by DistSQL except restarting proxy
Posted by GitBox <gi...@apache.org>.
sandynz merged pull request #15571:
URL: https://github.com/apache/shardingsphere/pull/15571
--
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 #15571: For #12449: If a scaling job failed or stopped then it could not be started by DistSQL except restarting proxy
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #15571:
URL: https://github.com/apache/shardingsphere/pull/15571#issuecomment-1047954662
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/15571?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 [#15571](https://codecov.io/gh/apache/shardingsphere/pull/15571?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7a7c98e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/f53f67a56f6cb3115f9b0cd2248c843fb46488b0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f53f67a) will **decrease** coverage by `0.00%`.
> The diff coverage is `0.00%`.
[](https://codecov.io/gh/apache/shardingsphere/pull/15571?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #15571 +/- ##
============================================
- Coverage 60.43% 60.43% -0.01%
- Complexity 1961 1986 +25
============================================
Files 3232 3231 -1
Lines 48574 48635 +61
Branches 8293 8310 +17
============================================
+ Hits 29356 29392 +36
- Misses 16817 16830 +13
- Partials 2401 2413 +12
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/15571?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ata/pipeline/core/execute/PipelineJobExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL2NvcmUvZXhlY3V0ZS9QaXBlbGluZUpvYkV4ZWN1dG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../pipeline/scenario/rulealtered/RuleAlteredJob.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL3NjZW5hcmlvL3J1bGVhbHRlcmVkL1J1bGVBbHRlcmVkSm9iLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...ine/scenario/rulealtered/RuleAlteredJobWorker.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL3NjZW5hcmlvL3J1bGVhbHRlcmVkL1J1bGVBbHRlcmVkSm9iV29ya2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...distsql/ral/ShowAllVariablesStatementTestCase.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtdGVzdC9zaGFyZGluZ3NwaGVyZS1wYXJzZXItdGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvdGVzdC9zcWwvcGFyc2VyL3BhcmFtZXRlcml6ZWQvamF4Yi9jYXNlcy9kb21haW4vc3RhdGVtZW50L2Rpc3RzcWwvcmFsL1Nob3dBbGxWYXJpYWJsZXNTdGF0ZW1lbnRUZXN0Q2FzZS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
| [...g/algorithm/sharding/mod/ModShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvYWxnb3JpdGhtL3NoYXJkaW5nL21vZC9Nb2RTaGFyZGluZ0FsZ29yaXRobS5qYXZh) | `76.92% <0.00%> (-4.56%)` | :arrow_down: |
| [...apache/shardingsphere/sharding/rule/TableRule.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcnVsZS9UYWJsZVJ1bGUuamF2YQ==) | `83.00% <0.00%> (-4.36%)` | :arrow_down: |
| [...executor/batch/BatchPreparedStatementExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9leGVjdXRvci9iYXRjaC9CYXRjaFByZXBhcmVkU3RhdGVtZW50RXhlY3V0b3IuamF2YQ==) | `94.23% <0.00%> (-3.60%)` | :arrow_down: |
| [.../manager/cluster/ClusterContextManagerBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9DbHVzdGVyQ29udGV4dE1hbmFnZXJCdWlsZGVyLmphdmE=) | `55.07% <0.00%> (-2.51%)` | :arrow_down: |
| [...end/text/distsql/ral/RALBackendHandlerFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/15571/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL1JBTEJhY2tlbmRIYW5kbGVyRmFjdG9yeS5qYXZh) | `91.66% <0.00%> (-0.18%)` | :arrow_down: |
| ... and [84 more](https://codecov.io/gh/apache/shardingsphere/pull/15571/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/15571?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/15571?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 [f53f67a...7a7c98e](https://codecov.io/gh/apache/shardingsphere/pull/15571?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] ReyYang commented on a change in pull request #15571: For #12449: If a scaling job failed or stopped then it could not be started by DistSQL except restarting proxy
Posted by GitBox <gi...@apache.org>.
ReyYang commented on a change in pull request #15571:
URL: https://github.com/apache/shardingsphere/pull/15571#discussion_r812539820
##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/scenario/rulealtered/RuleAlteredJob.java
##########
@@ -53,7 +53,7 @@ public void execute(final ShardingContext shardingContext) {
} catch (final RuntimeException ex) {
// CHECKSTYLE:ON
log.error("job prepare failed, {}-{}", shardingContext.getJobName(), shardingContext.getShardingItem());
- jobContext.close();
+ RuleAlteredJobWorker.getPIPELINE_JOB_EXECUTOR().stopJob(shardingContext.getJobName());
Review comment:
RuleAlteredJobSchedulerCenter.stop method will close jobContext.close()
--
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