As part of #10991 I took advantage of the new data structure to make Hash() run a lot faster; however the new version gives different answers to the old version. From my reading of the Prometheus code, this is OK because hash values are never persisted.
Later, I became aware that query-sharding in Mimir used this Hash function in persisted values. That is on Mimir (i.e. me) to fix.
My question to the group is: are there likely to be other places where it was assumed this value will never change? I can change the labels.Labels API to have a new FastHash() or similar which is used in performance-sensitive places, and reinstate the old slow one.
Either way I would add to the docs whether Hash() should be expected to change.
Bryan