Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate github.com/spaolacci/murmur3 to github.com/twmb/murmur3 #2539

Merged
merged 2 commits into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ require (
github.com/satori/go.uuid v1.2.0
github.com/sergi/go-diff v1.1.0
github.com/shirou/gopsutil v2.20.5+incompatible // indirect
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72
github.com/spf13/cast v1.3.1-0.20190531151931-f31dc0aaab5a // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand All @@ -103,6 +102,7 @@ require (
github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25 // indirect
github.com/stretchr/testify v1.4.0
github.com/subosito/gotenv v1.2.1-0.20190917103637-de67a6614a4d // indirect
github.com/twmb/murmur3 v1.1.3
github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553
github.com/uber-go/atomic v0.0.0-00010101000000-000000000000 // indirect
github.com/uber-go/tally v3.3.13+incompatible
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,8 @@ github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKw
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/twmb/murmur3 v1.1.3 h1:D83U0XYKcHRYwYIpBKf3Pks91Z0Byda/9SJ8B6EMRcA=
github.com/twmb/murmur3 v1.1.3/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553 h1:DRC1ubdb3ZmyyIeCSTxjZIQAnpLPfKVgYrLETQuOPjo=
github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553/go.mod h1:Rj7Csq/tZ/egz+Ltc2IVpsA5309AmSMEswjkTZmq2Xc=
github.com/uber-go/tally v3.3.13+incompatible h1:5ic2UsDwjcWsw9jvEdWEE2XsmGCLMTt5Ukg4d74fed4=
Expand Down
2 changes: 1 addition & 1 deletion src/aggregator/hash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// were added.
package hash

import "github.com/spaolacci/murmur3"
import "github.com/twmb/murmur3"

// Hash128 is a 128-bit hash of an ID consisting of two unsigned 64-bit ints.
type Hash128 [2]uint64
Expand Down
2 changes: 1 addition & 1 deletion src/aggregator/sharding/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/m3db/m3/src/metrics/metric/id"

"github.com/spaolacci/murmur3"
"github.com/twmb/murmur3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/client/connection_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/m3db/m3/src/dbnode/topology"
xclose "github.com/m3db/m3/src/x/close"

"github.com/spaolacci/murmur3"
"github.com/twmb/murmur3"
"github.com/uber/tchannel-go/thrift"
"go.uber.org/zap"
)
Expand Down
Empty file.
5 changes: 2 additions & 3 deletions src/dbnode/sharding/shardset.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import (

"github.com/m3db/m3/src/cluster/shard"
"github.com/m3db/m3/src/x/ident"

"github.com/spaolacci/murmur3"
twmbmurmur3 "github.com/twmb/murmur3"
)

var (
Expand Down Expand Up @@ -161,6 +160,6 @@ func NewHashGenWithSeed(seed uint32) HashGen {
// NewHashFn generates a HashFN based on murmur32 with a given seed
func NewHashFn(length int, seed uint32) HashFn {
return func(id ident.ID) uint32 {
return murmur3.Sum32WithSeed(id.Bytes(), seed) % uint32(length)
return twmbmurmur3.SeedSum32(seed, id.Bytes()) % uint32(length)
}
}
1 change: 0 additions & 1 deletion src/dbnode/sharding/shardset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"github.com/m3db/m3/src/cluster/shard"
"github.com/m3db/m3/src/x/ident"

"github.com/stretchr/testify/require"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
"github.com/leanovate/gopter"
"github.com/leanovate/gopter/gen"
"github.com/leanovate/gopter/prop"
"github.com/spaolacci/murmur3"
"github.com/twmb/murmur3"
"github.com/stretchr/testify/require"
)

Expand Down