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

Commit 1b21e43

Browse files
committed
restore and fix hash
1 parent 98bccbb commit 1b21e43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/schema/partition.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ func (m *MetricDefinition) PartitionID(method PartitionByMethod, partitions int3
108108
partition = -partition
109109
}
110110
case PartitionBySeriesWithTags:
111-
// h := xxhash.New()
112-
// h.WriteString(m.NameWithTags())
113-
// partition = jump.Hash(h.Sum64(), int(partitions))
111+
h := xxhash.New()
112+
h.Write([]byte(m.NameWithTags()))
113+
partition = jump.Hash(h.Sum64(), int(partitions))
114114
case PartitionBySeriesWithTagsFnv:
115115
h := util.NewFnv32aStringWriter()
116116
if len(m.nameWithTags) > 0 {

0 commit comments

Comments
 (0)