事務(wù)隔離級別前提下還是報錯
SET GLOBAL tx_isolation='READ-COMMITTED';
?
?show global variables like 'wait timeout';
發(fā)現(xiàn)mysql是8小時。如果flnk超過8小時沒有發(fā)送數(shù)據(jù),invoke將會導(dǎo)致
mysql主動斷開連接,而java側(cè)并無感知。
解決問題,在使用connect前,判斷當(dāng)前connect是否可用。
不可用重新創(chuàng)建鏈接即可。
寫法:借鑒FlinkJdbc再重試次數(shù)內(nèi)check當(dāng)前connect的寫法。也可以用durid池寫法。文章來源:http://www.zghlxwxcb.cn/news/detail-469237.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-469237.html
到了這里,關(guān)于flink寫mysql報錯Could not retrieve transation read-only status server的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!