diff --git a/src/dbnode/storage/shard_insert_queue_test.go b/src/dbnode/storage/shard_insert_queue_test.go index be692ba209..df3a76b3c6 100644 --- a/src/dbnode/storage/shard_insert_queue_test.go +++ b/src/dbnode/storage/shard_insert_queue_test.go @@ -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) @@ -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() { diff --git a/src/dbnode/x/tchannel/options.go b/src/dbnode/x/tchannel/options.go index d8e29537c7..1832884935 100644 --- a/src/dbnode/x/tchannel/options.go +++ b/src/dbnode/x/tchannel/options.go @@ -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. @@ -37,5 +40,8 @@ func NewDefaultChannelOptions() *tchannel.ChannelOptions { Logger: NewNoopLogger(), MaxIdleTime: defaultMaxIdleTime, IdleCheckInterval: defaultIdleCheckInterval, + DefaultConnectionOptions: tchannel.ConnectionOptions{ + SendBufferSize: defaultSendBufferSize, + }, } }