Worry more about fingerprint clashes
The chunk store fetch code assumes that fingerprints uniquely identify a timeseries; this is fairly likely when they are looking at a single metric, but we still could get clashes.
Perhaps use the sha256 from the index?
This is the relevant bits: https://github.com/cortexproject/cortex/blob/master/pkg/querier/chunk_store_queryable.go#L51-L68
The idea is that 2 different series could have same fingerprint and then we just say the chunks for both belong to one.
From a quick look through the code, I've the feeling that we also suffer hash collisions in results cache too (see cache.HashKey usage).
Not fixed by #3192 which addresses a similar problem in the querier.
I was thinking of code like this: https://github.com/cortexproject/cortex/blob/0a33f9d4c8ff23ec00972e33889b388e302a1df8/pkg/chunk/series_store.go#L248
I also found https://github.com/cortexproject/cortex/blob/0a33f9d4c8ff23ec00972e33889b388e302a1df8/pkg/distributor/distributor.go#L717 https://github.com/cortexproject/cortex/blob/0a33f9d4c8ff23ec00972e33889b388e302a1df8/pkg/distributor/query.go#L114-L120
Whilst the first example can be dropped when we deprecate chunks (#4268), the others still seem to be valid.