Update tidwall/btree
This commit is contained in:
parent
14cf045b6a
commit
8c267645bf
2
go.mod
2
go.mod
|
@ -43,7 +43,7 @@ require (
|
|||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.12.2
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/tidwall/btree v1.3.1
|
||||
github.com/tidwall/btree v1.6.0
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
go.opentelemetry.io/otel v1.8.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.8.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -475,8 +475,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/tidwall/btree v1.3.1 h1:636+tdVDs8Hjcf35Di260W2xCW4KuoXOKyk9QWOvCpA=
|
||||
github.com/tidwall/btree v1.3.1/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE=
|
||||
github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg=
|
||||
github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
|
||||
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
)
|
||||
|
||||
type tidwallBtree struct {
|
||||
tree *btree.Generic[pieceRequestOrderItem]
|
||||
tree *btree.BTreeG[pieceRequestOrderItem]
|
||||
PathHint *btree.PathHint
|
||||
}
|
||||
|
||||
|
@ -15,11 +15,11 @@ func (me *tidwallBtree) Scan(f func(pieceRequestOrderItem) bool) {
|
|||
|
||||
func NewTidwallBtree() *tidwallBtree {
|
||||
return &tidwallBtree{
|
||||
tree: btree.NewGenericOptions(
|
||||
tree: btree.NewBTreeGOptions(
|
||||
func(a, b pieceRequestOrderItem) bool {
|
||||
return a.Less(&b)
|
||||
},
|
||||
btree.Options{NoLocks: true}),
|
||||
btree.Options{NoLocks: true, Degree: 64}),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue