cockroachdb / cockroachdb/cockroach
ui/hot-ranges: page fails to load when a hot range's database has been dropped
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
The Hot Ranges (Top Ranges) page in the DB Console fails to load when a previously-hot range belongs to a database that has since been dropped. The page attempts to resolve which database the range's table belongs to, but because the database no longer exists, the resolution fails and the entire page errors out.
This occurs because the hot ranges system uses a windowed average (up to 30 minutes), so ranges from dropped databases can persist in the data after the database is gone.
**To Reproduce**
1. Create a database and apply load to a table so that one of its ranges is captured by the hot ranges system.
2. Drop the database.
3. Navigate to the Top Ranges page in the DB Console within 30 minutes of the drop.
4. The page fails to load.
**Expected behavior**
The Top Ranges page should handle dropped databases gracefully — either by omitting the orphaned range or by displaying it with a placeholder indicating the database no longer exists.
**Environment:**
- CockroachDB version: v25.4.8
- DB Console (Top Ranges page)
Jira issue: CRDB-62874
Contributor guide
Assessment
This issue has not been assessed yet.