Skip to content

Commit

Permalink
Don't cache non success responses
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoader committed Dec 29, 2022
1 parent b43df02 commit d7f5c39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ func (sc *snowflakeConn) getQueryResultResp(
}
}

sc.execRespCache.store(resultPath, respd)
if respd.Success {
sc.execRespCache.store(resultPath, respd)
}

return respd, nil
}

Expand Down Expand Up @@ -330,9 +333,10 @@ func (sc *snowflakeConn) waitForCompletedQueryResultResp(

if !response.Success {
logEverything(ctx, qid, response, startTime)
} else {
sc.execRespCache.store(resultPath, response)
}

sc.execRespCache.store(resultPath, response)
return response, nil
}

Expand Down

0 comments on commit d7f5c39

Please sign in to comment.