cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.9k stars 3.78k forks source link

ui: table details fail to load when navigating from hot ranges view #81542

Open matthewtodd opened 2 years ago

matthewtodd commented 2 years ago

via @dbist:

1, the fact I can navigate to the table details from the hot ranges is a huge productivity boost 2. the fact the table details don’t load once you click is not great. I confirmed the details load quickly if I were to navigate to databases / tables / table name image

navigating directly image (1)

navigating via hot ranges image (2)

Jira issue: CRDB-15084

matthewtodd commented 1 year ago

It seems like we've fixed this problem since it was reported:

On self-hosted, I've confirmed the problem's gone on both 22.1 and master (which is pretty close to 22.2).

On cloud, the hot ranges view doesn't exist, so the problem must have initially been observed on self-hosted. But I checked anyway, and the database table details views load just fine, even when force-reloaded, on dedicated and serverless.

maryliag commented 1 year ago

I checked again and this problem only happens with tables that contain / on the name, so you probably just need to add encodeURIComponent to the link that is being created

https://www.loom.com/share/7c9bf27fe95b41d0b07834fee36b0854

matthewtodd commented 1 year ago

That's interesting! And a different root cause than would have triggered the initial report (to perftest.dve_master). I'll get a quick fix in.

matthewtodd commented 1 year ago

Hmm, it's not as simple as the encodeURIComponent fix. Now I'm seeing errors talking to the server that can't be fixed in the same way:

$ curl http://localhost:3000/_admin/v1/databases/system/tables//System/NodeLiveness
Not Found
$ curl http://localhost:3000/_admin/v1/databases/system/tables/%2FSystem%2FNodeLiveness
<a href="/_admin/v1/databases/system/tables/System/NodeLiveness">Moved Permanently</a>.
$ curl http://localhost:3000/_admin/v1/databases/system/tables/System/NodeLiveness
Not Found

I suspect our problem is that these ranges don't represent tables at all, and so we shouldn't be linking them. I'll send out a PR to skip the links for "table" names with slashes in them to keep the conversation moving.