Description
The sql instance watcher relies on rangefeeds to update its internal cache of live sql instances. Rangefeed clients based on kvclient/rangefeed.Factory
must explicitly set an OnInternalError
handler to be notified of internal errors. Otherwise, when one of these errors are encountered the rangefeed will silently stop emitting events. This can cause the sql instance cache to get stale leading to the system believe certain instances are alive and accessible after they have already been shut down.
This issue tracks the work to update the sql instance watcher to ensure we handle such errors gracefully and prevent the cache from getting stale. This is a subset of the work identified in #75610.
Jira issue: CRDB-49869
Epic CRDB-50448