version: 2.1.2
pkg/sql/sqlbase/kvfetcher.go:makeKVFetcher()
The code is to determine whether the spans is overlapping.
} else if spans[i].EndKey.Compare(spans[i-1].EndKey) < 0 {
I think this should be
} else if spans[i].EndKey.Compare(spans[i-1].Key) < 0 {