Skip to content

Commit

Permalink
Honor the idempotent flag for retries
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwiaszunejko committed Nov 18, 2024
1 parent 64cddbe commit b696192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b696192

Please sign in to comment.