Skip to content

Commit

Permalink
With higher tchannel send buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
robskillington committed Jul 20, 2020
1 parent 09fcc34 commit e8f25ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dbnode/storage/shard_insert_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func TestShardInsertQueueBatchBackoff(t *testing.T) {
currTime = currTime.Add(d)
}
backoff = 10 * time.Millisecond
insertWgs [3]sync.WaitGroup
insertProgressWgs [3]sync.WaitGroup
insertWgs [64]sync.WaitGroup
insertProgressWgs [64]sync.WaitGroup
)
for i := range insertWgs {
insertWgs[i].Add(1)
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestShardInsertQueueRateLimit(t *testing.T) {
return currTime
}, tally.NoopScope, zap.NewNop())

q.insertPerSecondLimit = 2
q.insertPerSecondLimit.Store(2)

require.NoError(t, q.Start())
defer func() {
Expand Down
6 changes: 6 additions & 0 deletions src/dbnode/x/tchannel/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import (
const (
defaultIdleCheckInterval = 5 * time.Minute
defaultMaxIdleTime = 5 * time.Minute
// defaultSendBufferSize sets the default send buffer size,
// by default only 512 frames would be buffered.
defaultSendBufferSize = 16384
)

// NewDefaultChannelOptions returns the default tchannel options used.
Expand All @@ -37,5 +40,8 @@ func NewDefaultChannelOptions() *tchannel.ChannelOptions {
Logger: NewNoopLogger(),
MaxIdleTime: defaultMaxIdleTime,
IdleCheckInterval: defaultIdleCheckInterval,
DefaultConnectionOptions: tchannel.ConnectionOptions{
SendBufferSize: defaultSendBufferSize,
},
}
}

0 comments on commit e8f25ea

Please sign in to comment.