Conversation
As discussed, we're going to go with a sha256. |
pkg/chunk/inmemory_storage_client.go
Outdated
There was a problem hiding this comment.
We should change this to error if its a duplicate within the batch, to match server behaviour.
There was a problem hiding this comment.
We are already doing so a few lines above. I didn't remove the Dupe write check across all writes as it's still useful for checking if chunks are no duplicated.
pkg/chunk/schema.go
Outdated
There was a problem hiding this comment.
There was a problem hiding this comment.
Can we decode the string back into model.Metric?
There was a problem hiding this comment.
I couldn't find a convenient function, no.
I don't like the idea of putting JSON in here, its a PITA to deal with backwards compatibility etc. But I guess it'll have to do for now.
03cefcf to
83bb69d
Compare
First step for #416.
This index will be used to fetch series from the index. It will replace the metric name index and we will make the switch after the next steps are complete.
Decided to encode the
model.Metricas JSON because it already implements thejson.Unmarshalerinterface.Used sha256 for identifying the series as the variant of fnv64a which if used for fingerprints is not unique enough for indexing and using sha256 keeps it simple (we don't have to deal with collision logic).
Test plan