mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Ensure at least 1 thread for thread pool.
This commit is contained in:
@@ -80,8 +80,8 @@ public class MysqlMultiStageCoprocessor extends AbstractCanalLifeCycle implement
|
|||||||
this.disruptorMsgBuffer = RingBuffer.createSingleProducer(new MessageEventFactory(),
|
this.disruptorMsgBuffer = RingBuffer.createSingleProducer(new MessageEventFactory(),
|
||||||
ringBufferSize,
|
ringBufferSize,
|
||||||
new BlockingWaitStrategy());
|
new BlockingWaitStrategy());
|
||||||
|
int tc = parserThreadCount > 0 ? parserThreadCount : 1;
|
||||||
this.parserExecutor = Executors.newFixedThreadPool(parserThreadCount,
|
this.parserExecutor = Executors.newFixedThreadPool(tc,
|
||||||
new NamedThreadFactory("MultiStageCoprocessor-Parser-" + destination));
|
new NamedThreadFactory("MultiStageCoprocessor-Parser-" + destination));
|
||||||
|
|
||||||
this.stageExecutor = Executors.newFixedThreadPool(2, new NamedThreadFactory("MultiStageCoprocessor-other-"
|
this.stageExecutor = Executors.newFixedThreadPool(2, new NamedThreadFactory("MultiStageCoprocessor-other-"
|
||||||
|
|||||||
Reference in New Issue
Block a user