Skip to content

Commit 26bbf39

Browse files
committed
fixed skipped cancellation check
1 parent fcdf02d commit 26bbf39

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • client-v2/src/main/java/com/clickhouse/client/api

client-v2/src/main/java/com/clickhouse/client/api/Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ public CompletableFuture<InsertResponse> insert(String tableName,
16881688
} catch (Exception e) {
16891689
String msg = requestExMsg("Insert", (i + 1), durationSince(startTime).toMillis(), requestSettings.getQueryId());
16901690
lastException = httpClientHelper.wrapException(msg, e, requestSettings.getQueryId());
1691-
if (httpClientHelper.shouldRetry(e, requestSettings.getAllSettings())) {
1691+
if (httpClientHelper.shouldRetry(e, requestSettings.getAllSettings()) && requestIsNotCancelled(requestSettings.getQueryId())) {
16921692
if (i < maxAttempts) {
16931693
LOG.warn("Retrying.", e);
16941694
selectedEndpoint = nodeSelector.getNextAliveNode(selectedEndpoint);

0 commit comments

Comments
 (0)