sandynz commented on code in PR #25950:
URL: https://github.com/apache/shardingsphere/pull/25950#discussion_r1211009995
##########
kernel/data-pipeline/cdc/core/src/main/java/org/apache/shardingsphere/data/pipeline/cdc/core/connector/SocketSinkImporterConnector.java:
##########
@@ -116,6 +117,9 @@ public void write(final List<Record> recordList, final
SocketSinkImporter socket
int dataRecordCount = (int)
recordList.stream().filter(DataRecord.class::isInstance).count();
Record lastRecord = recordList.get(recordList.size() - 1);
if (lastRecord instanceof FinishedRecord && 0 == dataRecordCount) {
+ while
(CDCAckHolder.getInstance().hasPositionNeedToBeAckBeforeFinished(socketSinkImporter))
{
+ Thread.sleep(500);
+ }
Review Comment:
Is there better way?
##########
kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/OpenGaussWALDumper.java:
##########
@@ -92,6 +93,7 @@ protected void runBlocking() {
break;
} catch (final SQLException ex) {
int times = reconnectTimes.incrementAndGet();
+ Thread.sleep(Math.min(10 * 1000L, 1000L << times));
Review Comment:
The reconnect might not continue one by one, do we need to sleep more and
more time?
--
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]