Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix log error when multi-table sink close #5683

Merged
merged 10 commits into from
Oct 25, 2023

Conversation

Hisoka-X
Copy link
Member

Purpose of this pull request

Fix MultiTableSinkWriter will log error even job execute successed. This cause by MultiTableWriterRunnable, it will reported InterruptedException sometimes when be closed by ExecutorService. So this PR ignore this Exception when task close. This exception will be like:

2023-10-21 11:48:32,838 ERROR org.apache.seatunnel.connectors.seatunnel.common.multitablesink.MultiTableWriterRunnable - MultiTableWriterRunnable error
java.lang.InterruptedException: null
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2019) ~[?:1.8.0_362]
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2093) ~[?:1.8.0_362]
        at java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) ~[?:1.8.0_362]
        at org.apache.seatunnel.connectors.sea2023-10-21 11:48:32,838 INFO  org.apache.seatunnel.engine.server.TaskExecutionService - [localhost]:5801 [seatunnel-597158] [5.1] Task TaskGroupLocation{jobId=767957395316932609, pipelineId=1, taskGroupId=50000} complete with state FINISHED
tunnel.common.multitablesink.MultiTableWriterRunnable.run(MultiTableWriterRunnable.java:47) [connector-fake-2.3.4-SNAPSHOT.jar:2.3.4-SNAPSHOT]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_362]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_362]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_362]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_362]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_362]
2023-10-21 11:48:32,853 INFO  org.apache.seatunnel.engine.server.CoordinatorService - [localhost]:5801 [seatunnel-597158] [5.1] Received task end from execution TaskGroupLocation{jobId=767957395316932609, pipelineId=1, taskGroupId=50000}, state FINISHED

This bug does not affect the correctness of the job, it just prints confusing error logs in the log.

Does this PR introduce any user-facing change?

no

How was this patch tested?

add new test.

Check list

@Hisoka-X Hisoka-X added the bug label Oct 21, 2023
Hisoka-X and others added 2 commits October 23, 2023 11:25
…che/seatunnel/connectors/seatunnel/common/multitablesink/MultiTableWriterRunnable.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>
ruanwenjun
ruanwenjun previously approved these changes Oct 23, 2023
Copy link
Member

@ruanwenjun ruanwenjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruanwenjun ruanwenjun merged commit fea4b6f into apache:dev Oct 25, 2023
@Hisoka-X Hisoka-X deleted the fix-multi-table-log branch October 25, 2023 10:16
ruanwenjun pushed a commit to ruanwenjun/incubator-seatunnel that referenced this pull request Nov 6, 2023
…#468)

* [Fix] Fix log error when multi-table sink close (apache#5683)

* format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants