In https://github.com/cockroachdb/docs/issues/4331 we identified a need to add guidance around transaction retries. Unfortunately, this is insufficient. We need to be able to list all of the major transaction retry types as well as likely causes and most importantly, what to _do_ about these errors.
Recently this came up for a customer in https://github.com/cockroachlabs/support/issues/334. We need a thorough audit of this information.
And so on
In addition to reference docs on the error types, we should also show the user where to look in the admin UI to get the list of KV Transaction Restarts (from Metrics > Dashboard: Distributed), which could help when troubleshooting.
(Caveat: I did a quick search for Admin UI docs on the above but did not find, so those may also need updating.)

@awoods187 I'd like to bump this ticket. An app team that is quite sophisticated is running into problems with contention, they've read the retry docs, and still keep bumping up against different errors that get returned to them. They are reasonably fine grokking that serializability errors can occur, but without any documentation as to why or what happened, the best they can do is come to the CockroachDB team (a/k/a/ me).
@jseldess, @rmloveland: I'll echo the same. I see it's labelled P-1. Are we expecting to have this done by 20.1?
@jasobrown, thank you for bumping this. We value your input deeply. Although we won't be able to tackle this docs work for the 20.1 release, it will be a priority soon after.
@ericharmeling, @rmloveland, let's think this through together, with @awoods187 and others, following the release.
Although we won't be able to tackle this docs work for the 20.1 release
I think that's fine as 20.1 is basically right around the corner. Keep up the great work on the docs team!
This is really really needed. I have to answer these questions a lot, and I'm sure I get them wrong all the time.
Related, from https://github.com/cockroachdb/docs/issues/5470:
We are currently updating our code samples with a retry loop to handle client-side transaction retries.
However, there are other error conditions we may want to handle as well.
For example, we should probably handle the error types in Class 08 - Connection Exception from the PG error codes, namely:
08000: connection_exception08003: connection_does_not_exist08006: connection_failure08001: sqlclient_unable_to_establish_sqlconnection08004: sqlserver_rejected_establishment_of_sqlconnection08007: transaction_resolution_unknown08P01: protocol_violationMore good examples of explaining it https://cockroachlabs.slack.com/archives/CFR37CA4A/p1588198208102900
Most helpful comment
I think that's fine as 20.1 is basically right around the corner. Keep up the great work on the docs team!