When to implement client-side retry handling

Is it only statements that use "begin; ... commit;" AND when the statements are sent individually AND when at least one of the statements is updating the database that I need to implement client-side retry handling (https://www.cockroachlabs.com/docs/stable/transactions.html#client-side-intervention) or are there any other statements that should implement client-side retry handling?

The reason I’m asking is because I’m using gorm (for go) as ORM and need to understand which statements I need to wrap in crdb.ExecuteInTx.

Hi @ofinnsson! You can omit the client-side retry for the two cases described in https://www.cockroachlabs.com/docs/stable/transactions.html#automatic-retries. For everything else you need it. You also need it if the results being returned are sufficiently large (past some threshold we start streaming them back instead of buffering them all while the txn finishes).