cockroachdb / cockroachdb/cockroach
sql/instancestorage: TestRefreshSession tries to use logic that is not copacetic
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
When pointing TestRefreshSession to a secondary tenant, we get the following error:
```
sql_runner.go:322: error executing 'SELECT count(*) FROM system.sql_instances WHERE id = 1 AND session_id <> decode('010180bafc8a4b9cfa441db9fee7401e7791f6', 'hex')': pq: no healthy sql instances available for planning
```
Which is hardly surprising, given the test removes the rows just before.
It's unclear what the test is trying to do -- removing the rows in that table will block SQL planning, which will prevent further SQL.
**Expected behavior**
The test works equally well when pointed to a secondary tenant.
cc @dt
Jira issue: CRDB-30910
Epic CRDB-26687
Contributor guide
Assessment
This issue has not been assessed yet.