Open erikgrinaker opened 3 years ago
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
In #66682 we saw significant performance problems in Raft causing constant elections and stuck ranges. It turned out this was caused by the 1000 key readahead in MVCCIterate:
https://github.com/cockroachdb/cockroach/blob/8f5231d3443f372c88632c8b77c7d954890cc334/pkg/storage/mvcc.go#L2662-L2666
The caller had passed an iterator function that was supposed to terminate early (in that case after the first entry), but this is only called after the 1000 entries have been fetched:
https://github.com/cockroachdb/cockroach/blob/8f5231d3443f372c88632c8b77c7d954890cc334/pkg/storage/mvcc.go#L2679-L2686
In #66816 @nvanbenschoten notes:
@petermattis adds:
Jira issue: CRDB-8248