cockroachdb / cockroachdb/cockroach

kvserver/rangefeed: catch up scan doesn't watch for context cancellation

Open
#125,953 0 comments 0 reactions 0 assignees View on GitHub
A-kv-rangefeed C-enhancement T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**

https://github.com/cockroachdb/cockroach/blob/8a43fac15a431b6a85a33da292cbd3ecb662f169/pkg/kv/kvserver/rangefeed/catchup_scan.go#L143 doesn't watch for context cancellation properly. This means that - when registration disconnects and server sends an error back to client notifying rangefeed completion, catch up scans for this registration may still be running. Once catch up scan is done, registration eventually shut down here https://github.com/cockroachdb/cockroach/blob/8a43fac15a431b6a85a33da292cbd3ecb662f169/pkg/kv/kvserver/rangefeed/registry.go#L354. But this may cause problems when catch up scans are taking long.

Jira issue: CRDB-39683

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.