From b6961929791891aa79ecb99651dda32f554e3092 Mon Sep 17 00:00:00 2001 From: sylwiaszunejko Date: Mon, 18 Nov 2024 13:46:37 +0100 Subject: [PATCH] Honor the idempotent flag for retries --- query_executor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/query_executor.go b/query_executor.go index 7bbe7f6ab..26aa09c4a 100644 --- a/query_executor.go +++ b/query_executor.go @@ -149,7 +149,8 @@ func (q *queryExecutor) do(ctx context.Context, qry ExecutableQuery, hostIter Ne // Exit if the query was successful // or no retry policy defined - if iter.err == nil || rt == nil { + // or query is not marked as idempotent + if iter.err == nil || rt == nil || !qry.IsIdempotent() { return iter }