Update tidwall/btree

This commit is contained in:
Matt Joiner 2022-12-31 13:25:00 +11:00
parent 14cf045b6a
commit 8c267645bf
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
3 changed files with 6 additions and 6 deletions

2
go.mod
View File

@ -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
View File

@ -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=

View File

@ -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}),
}
}