You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2024/02/02 07:20:43 UTC
[PR] Add optional `FORCE` key word at drop streaming DistSQL [shardingsphere]
azexcy opened a new pull request, #29965:
URL: https://github.com/apache/shardingsphere/pull/29965
Related #29259, #22500
Changes proposed in this pull request:
- Kill -9 proxy will not update CDC Job config, add force key word at drop streaming DistSQL.
---
Before committing this PR, I'm sure that I have checked the following options:
- [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
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
Re: [PR] Add optional `FORCE` key word at drop streaming DistSQL [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on code in PR #29965:
URL: https://github.com/apache/shardingsphere/pull/29965#discussion_r1475794995
##########
kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/CDCJobAPI.java:
##########
@@ -257,10 +257,14 @@ public void disable(final String jobId) {
* Drop CDC job.
*
* @param jobId job id
+ * @param force force
*/
- public void drop(final String jobId) {
+ public void drop(final String jobId, final boolean force) {
CDCJobConfiguration jobConfig = jobConfigManager.getJobConfiguration(jobId);
- ShardingSpherePreconditions.checkState(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId).isDisabled(), () -> new PipelineInternalException("Can't drop streaming job which is active"));
+ if (!force) {
+ ShardingSpherePreconditions.checkState(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId).isDisabled(),
+ () -> new PipelineInternalException("Can't drop streaming job which is active"));
+ }
Review Comment:
Could we just remove `checkState` to allow drop when job is active?
I just planed to remove it, since CDC job could not be dropped when CDC E2E test failure in some cases.
--
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
Re: [PR] Add optional `FORCE` key word at drop streaming DistSQL [shardingsphere]
Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy commented on code in PR #29965:
URL: https://github.com/apache/shardingsphere/pull/29965#discussion_r1477196066
##########
kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/api/CDCJobAPI.java:
##########
@@ -257,10 +257,14 @@ public void disable(final String jobId) {
* Drop CDC job.
*
* @param jobId job id
+ * @param force force
*/
- public void drop(final String jobId) {
+ public void drop(final String jobId, final boolean force) {
CDCJobConfiguration jobConfig = jobConfigManager.getJobConfiguration(jobId);
- ShardingSpherePreconditions.checkState(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId).isDisabled(), () -> new PipelineInternalException("Can't drop streaming job which is active"));
+ if (!force) {
+ ShardingSpherePreconditions.checkState(PipelineJobIdUtils.getElasticJobConfigurationPOJO(jobId).isDisabled(),
+ () -> new PipelineInternalException("Can't drop streaming job which is active"));
+ }
Review Comment:
I move `checkState` method, make sure DistSQL could drop job anytime.
--
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
Re: [PR] Allow drop active CDC jobs via DistSQL [shardingsphere]
Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz merged PR #29965:
URL: https://github.com/apache/shardingsphere/pull/29965
--
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