You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOG.error("Error code [{}] wasn't in the acceptable list. Transport protocol code [{}]", clickHouseServerException.getCode(), clickHouseServerException.getTransportProtocolCode());
77
+
}
70
78
default:
71
79
LOG.error("Error code [{}] wasn't in the acceptable list.", clickHouseServerException.getCode());
Copy file name to clipboardExpand all lines: flink-connector-clickhouse-base/src/main/java/org/apache/flink/connector/clickhouse/data/ClickHousePayload.java
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,13 @@ public class ClickHousePayload implements Serializable {
Copy file name to clipboardExpand all lines: flink-connector-clickhouse-base/src/main/java/org/apache/flink/connector/clickhouse/sink/ClickHouseAsyncWriter.java
LOG.warn("Retry number [{}] out of [{}]", firstElement.getAttemptCount(), this.numberOfRetries);
182
+
firstElement.incrementAttempts();
183
+
if (firstElement.getAttemptCount() <= this.numberOfRetries) {
184
+
totalBatchRetriesCounter.inc();
185
+
LOG.warn("Retriable exception occurred while processing request. Left attempts {}.", this.numberOfRetries - (firstElement.getAttemptCount() - 1) );
186
+
// We are not in retry threshold we can send data again
187
+
resultHandler.retryForEntries(requestEntries);
188
+
return;
189
+
} else {
190
+
LOG.warn("No attempts left going to drop batch");
191
+
}
192
+
}
193
+
146
194
}
147
195
LOG.info("Dropping request entries. Since It a failure that can not be retried. error {} number of entries drop {}", error.getLocalizedMessage(), requestEntries.size());
Copy file name to clipboardExpand all lines: flink-connector-clickhouse-base/src/test/java/org/apache/flink/connector/clickhouse/sink/ClickHouseSinkTests.java
Copy file name to clipboardExpand all lines: flink-connector-clickhouse-base/src/test/java/org/apache/flink/connector/test/embedded/clickhouse/ClickHouseServerForTests.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,12 @@ public static void tearDown() {
0 commit comments