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/05/19 10:17:10 UTC

[GitHub] [shardingsphere] azexcy commented on a diff in pull request #17801: Async execute pipeline job task,avoid blocking zk events

azexcy commented on code in PR #17801:
URL: https://github.com/apache/shardingsphere/pull/17801#discussion_r876879629


##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/execute/PipelineJobExecutor.java:
##########
@@ -48,7 +50,7 @@ public final class PipelineJobExecutor extends AbstractLifecycleExecutor {
     
     private static final Pattern CONFIG_PATTERN = Pattern.compile(DataPipelineConstants.DATA_PIPELINE_ROOT + "/(\\d{2}[0-9a-f]+)/config");
     
-    private static final RuleAlteredJobConfigurationSwapper JOB_CONFIG_SWAPPER = new RuleAlteredJobConfigurationSwapper();
+    private final Executor executor = Executors.newFixedThreadPool(20);

Review Comment:
   Yes,athough the thread is in the whole life cycle, but I think shutting down at `doStop` is better practice



-- 
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