cockroachdb / cockroachdb/cockroach
sql,server: abstract at least 3 of the tenant rangefeed watchers
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Requested by @yuzefovich in #110947.
**Is your feature request related to a problem? Please describe.**
The code in the following watchers is very similar:
- tenant settings watcher
- tenant info watcher
- tenant capabilities watcher
- settings watcher
It is very redundant and yet needs to do things in a precise order to avoid race conditions and deadlocks.
We need to reduce this complexity to increase maintainability.
**Describe the solution you'd like**
Abstract at least 2 (preferably at least 3) of the watchers into a common library used in multiple places.
Also merge the tenant capabilities and info watchers into just 1.
Epic: CRDB-26691
Jira issue: CRDB-31697
Contributor guide
Assessment
This issue has not been assessed yet.