Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
restore and fix hash
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Oct 7, 2022
1 parent 98bccbb commit 1b21e43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/schema/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ func (m *MetricDefinition) PartitionID(method PartitionByMethod, partitions int3
partition = -partition
}
case PartitionBySeriesWithTags:
// h := xxhash.New()
// h.WriteString(m.NameWithTags())
// partition = jump.Hash(h.Sum64(), int(partitions))
h := xxhash.New()
h.Write([]byte(m.NameWithTags()))
partition = jump.Hash(h.Sum64(), int(partitions))
case PartitionBySeriesWithTagsFnv:
h := util.NewFnv32aStringWriter()
if len(m.nameWithTags) > 0 {
Expand Down

0 comments on commit 1b21e43

Please sign in to comment.