azexcy commented on code in PR #28998:
URL: https://github.com/apache/shardingsphere/pull/28998#discussion_r1389094618
##########
kernel/data-pipeline/scenario/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/job/CDCJob.java:
##########
@@ -200,6 +202,10 @@ public void onFailure(final Throwable throwable) {
log.error("onFailure, {} task execute failed.", identifier,
throwable);
String jobId = jobItemContext.getJobId();
jobAPI.updateJobItemErrorMessage(jobId,
jobItemContext.getShardingItem(), throwable);
+ if (jobItemContext.getSink() instanceof CDCSocketSink) {
+ CDCSocketSink cdcSink = (CDCSocketSink)
jobItemContext.getSink();
+ cdcSink.getChannel().writeAndFlush(CDCResponseUtils.failed("",
"", throwable.getMessage()));
Review Comment:
I find some related question:
https://lists.jboss.org/pipermail/netty-users/2008-November/000045.html
https://stackoverflow.com/questions/23161608/is-netty4-channelhandlercontext-write-thread-safe
--
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]