Open
Description
Found in #49513, a KV error went through all the layers and popped up in the client unadulterated:
pq: unable to select removal target from [(n1,s1):?]; current replicas [(n2,s2):1 (n7,s7):2 (n1,s1):3 (n8,s8):4]: could not select an appropriate replica to be removed
The present issue is not about investigating the cause of the error and instead focuses on the communication of this error throughout CockroachDB.
There are a couple of problems with this situation:
- it does not carry a pg error code
- it does not provide SQL-level context (which type of operation was being performed)
- it does not suggest whether the operation is retryable
- it probably is overly confusing - there's nothing about the replica details that's remotely useful to the user of a SQL client.
The way forward would be to address this in SQL by:
- logging the details of the error via
%+v
in the log file - replacing the details by a SQL-level summary of the situation (via
errors.Handled()
)
cc @andreimatei if you have suggestions as to how/where to do this? Perhaps the error could be summarized by txncoordsender before it comes into SQL?
cc @asubiotto @jordanlewis for triage.
Jira issue: CRDB-4177
Metadata
Metadata
Assignees
Labels
Error messages, error propagations/annotationsRelating to the KV client and the KV interface.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.KV TeamSQL Queries Team
Type
Projects
Status
Backlog