????????????????????MySQL??????????Connection??????????
??????????????Connection A???????? T ??commit()????????????Connection 
A??????A???? TwoPhaseCommitSinkFunction 
????pendingCommitTransactions??????????????????????????Connection 
B????????commit????T????????????????????????????????????????????


??????????????MySQL??????????2PC??????????????????????????????
????????????????????????????????




------------------ ???????? ------------------
??????:                                                                         
                                               "user-zh"                        
                                                            
<[email protected]&gt;;
????????:&nbsp;2020??7??31??(??????) ????9:21
??????:&nbsp;"user-zh"<[email protected]&gt;;

????:&nbsp;????: Re: Flink????Kafka??Mysql?? End-To-End Exactly-Once????????????



??????????????????????????????????????????????????????



[email protected]
&nbsp;
???????? ??????
?????????? 2020-01-03 15:18
???????? user-zh
?????? Re: Flink????Kafka??Mysql?? End-To-End Exactly-Once????????????
??????????????????????????????mysql-connector-java????????????????????????mysql-connector-java??????????????????????????????
&nbsp;
&gt; ?? 2020??1??3????????3:13??????2008 <[email protected]&gt; ??????
&gt; 
&gt; ??????1??????????????mysql-connector-java??latest????
&gt; ??????????5.1.6??????????????????
&gt; ????5.1.48????????
&gt; <dependency&amp;gt;
&gt; &amp;nbsp; &amp;nbsp; <groupId&amp;gt;mysql</groupId&amp;gt;
&gt; &amp;nbsp; &amp;nbsp; 
<artifactId&amp;gt;mysql-connector-java</artifactId&amp;gt;
&gt; &amp;nbsp; &amp;nbsp; <version&amp;gt;5.1.48</version&amp;gt;
&gt; </dependency&amp;gt;
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; ------------------&amp;nbsp;????????&amp;nbsp;------------------
&gt; ??????:&amp;nbsp;"LakeShen"<[email protected]&amp;gt;;
&gt; ????????:&amp;nbsp;2019??12??26??(??????) ????11:35
&gt; ??????:&amp;nbsp;"user-zh"<[email protected]&amp;gt;;
&gt; 
&gt; ????:&amp;nbsp;Re: Flink????Kafka??Mysql?? End-To-End 
Exactly-Once????????????
&gt; 
&gt; 
&gt; 
&gt; ?????????????????????????? ??????????????
&gt; 
&gt; Best wishes??
&gt; ????
&gt; 
&gt; ?????? <[email protected]&amp;gt; ??2019??12??25?????? ????4:09??????
&gt; 
&gt; &amp;gt; ????????????
&gt; &amp;gt;
&gt; &amp;gt; ??????????Kafka??Mysql?? End-To-End 
Exactly-Once??????????2????????
&gt; &amp;gt; 
1??com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
&gt; &amp;gt; Communications link failure during commit(). Transaction 
resolution unknown.
&gt; &amp;gt; 2??org.apache.flink.streaming.runtime.tasks.TimerException:
&gt; &amp;gt; 
org.apache.flink.streaming.runtime.tasks.ExceptionInChainedOperatorException:
&gt; &amp;gt; Could not forward element to next operator
&gt; &amp;gt;
&gt; &amp;gt; ??????????????????????????????demo????????
&gt; &amp;gt; git clone https://github.com/lusecond/flink_help --depth=1
&gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt; 
????????????????????TwoPhaseCommitSinkFunction????4??????????beginTransaction??preCommit??commit??abort
&gt; &amp;gt; 
????????????????????????????????????????????jdbc????????????????????????????????????????????????????????

回复