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
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=
)
type tidwallBtree struct {
- tree *btree.Generic[pieceRequestOrderItem]
+ tree *btree.BTreeG[pieceRequestOrderItem]
PathHint *btree.PathHint
}
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}),
}
}