go.mod | 2 +- go.sum | 4 ++-- request-strategy/tidwall-btree.go | 6 +++--- diff --git a/go.mod b/go.mod index 29d79a7ee54a74290a54a1b3a47613f7d793886a..1c5322135040c2e13d811999aadc7b60ee9efb3a 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ github.com/pion/webrtc/v3 v3.1.42 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 diff --git a/go.sum b/go.sum index 88f91cf1e30be9c6a745c31b0b608b4d70d0e339..75799c5a7ae0e456959de93978c1d1f7c260bec1 100644 --- a/go.sum +++ b/go.sum @@ -475,8 +475,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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= diff --git a/request-strategy/tidwall-btree.go b/request-strategy/tidwall-btree.go index 6d786ce26be0f668e51e25f90d1d91a630634c45..6b84dc0510a1e70983df33d4702ec8e1b4089ead 100644 --- a/request-strategy/tidwall-btree.go +++ b/request-strategy/tidwall-btree.go @@ -5,7 +5,7 @@ "github.com/tidwall/btree" ) type tidwallBtree struct { - tree *btree.Generic[pieceRequestOrderItem] + tree *btree.BTreeG[pieceRequestOrderItem] PathHint *btree.PathHint } @@ -15,11 +15,11 @@ } 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}), } }