Skip to content

Commit

Permalink
Remove BBR flow control until upstream bug is resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Jan 11, 2023
1 parent 77542ad commit 503685e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/stretchr/testify v1.8.1
github.com/tetratelabs/wazero v1.0.0-pre.4
github.com/thejerf/suture/v4 v4.0.2
github.com/wetware/casm v0.0.0-20230103165725-c29acf614f84
github.com/wetware/casm v0.0.0-20230111190411-32f57045e0d4
golang.org/x/sync v0.1.0
gopkg.in/alexcesaro/statsd.v2 v2.0.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6f
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w=
github.com/wetware/casm v0.0.0-20230103165725-c29acf614f84 h1:++13uCsaHApqYq4llKyKNYQM6qtjrTAYqLlvGNpWrfs=
github.com/wetware/casm v0.0.0-20230103165725-c29acf614f84/go.mod h1:hNSpIZKBzkQtZBw3D17iznaMb+7dA52pbfYscE4T1Qc=
github.com/wetware/casm v0.0.0-20230111190411-32f57045e0d4 h1:vJA/XG+wrvMqT6Swy+0LogetHXMxRyuPTYzN/QOdpNE=
github.com/wetware/casm v0.0.0-20230111190411-32f57045e0d4/go.mod h1:QAPoA9c6Sv7akZEGAby3mmCGKpBucwAyTjHgJ4tWj7U=
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k=
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc=
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow=
Expand Down
4 changes: 1 addition & 3 deletions pkg/csp/chan.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"errors"

"capnproto.org/go/capnp/v3"
"capnproto.org/go/capnp/v3/exp/clock"
"capnproto.org/go/capnp/v3/flowcontrol/bbr"
casm "github.com/wetware/casm/pkg"
"github.com/wetware/casm/pkg/util/stream"
"github.com/wetware/ww/internal/api/channel"
Expand Down Expand Up @@ -209,7 +207,7 @@ func (s Sender) Send(ctx context.Context, v Value) (casm.Future, capnp.ReleaseFu
// for a given sender.
func (s Sender) NewStream(ctx context.Context) SendStream {
sender := channel.Sender(s)
sender.SetFlowLimiter(bbr.NewLimiter(clock.System))
// TODO: use BBR once scheduler bug is fixed

return SendStream{
ctx: ctx,
Expand Down
6 changes: 2 additions & 4 deletions pkg/pubsub/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"context"

"capnproto.org/go/capnp/v3"
"capnproto.org/go/capnp/v3/exp/clock"
"capnproto.org/go/capnp/v3/flowcontrol/bbr"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/lthibault/log"

Expand Down Expand Up @@ -57,7 +55,7 @@ func (t Topic) Publish(ctx context.Context, b []byte) error {
// through a flow-controlled channel. This will override the existing
// FlowLimiter.
func (t Topic) NewStream(ctx context.Context) Stream {
api.Topic(t).SetFlowLimiter(bbr.NewLimiter(clock.System))
// TODO: use BBR once scheduler bug is fixed

cherr := make(chan error, 1)
done := make(chan struct{})
Expand Down Expand Up @@ -235,7 +233,7 @@ func (t topicServer) Subscribe(ctx context.Context, call MethodSubscribe) error
defer sub.Cancel()

sender := call.Args().Chan()
sender.SetFlowLimiter(bbr.NewLimiter(clock.System))
// TODO: use BBR once scheduler bug is fixed

t.log.Debug("registered subscription handler")
defer t.log.Debug("unregistered subscription handler")
Expand Down

0 comments on commit 503685e

Please sign in to comment.