sandynz commented on code in PR #29277:
URL: https://github.com/apache/shardingsphere/pull/29277#discussion_r1414969899
##########
kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/common/ingest/channel/memory/SimpleMemoryPipelineChannel.java:
##########
@@ -60,7 +59,11 @@ public List<Record> fetchRecords(final int batchSize, final
long timeout, final
do {
List<Record> records = queue.poll();
if (null == records || records.isEmpty()) {
- TimeUnit.MILLISECONDS.sleep(Math.min(100, timeoutMillis));
+ try {
+ TimeUnit.MILLISECONDS.sleep(Math.min(100, timeoutMillis));
+ } catch (final InterruptedException ignored) {
+ return Collections.emptyList();
+ }
Review Comment:
Similar issue as OpenGaussWALDumper, but it'll affect more types of job.
##########
kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/OpenGaussWALDumper.java:
##########
@@ -96,7 +94,11 @@ protected void runBlocking() {
int times = reconnectTimes.incrementAndGet();
log.error("Connect failed, reconnect times={}", times, ex);
if (isRunning()) {
- Thread.sleep(5000L);
+ try {
+ Thread.sleep(5000L);
+ } catch (final InterruptedException ignored) {
+ break;
+ }
Review Comment:
If InterruptedException is ignored, then CDCJob might consider this dumper
running fine without error and trigger next step.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]