Compare commits

...

3 commits

Author SHA1 Message Date
4cb0068dde [#37] signature: Increase pool max object size
According to the results of profiling, objects with a size of 72KB
are mainly allocated.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-02 17:20:24 +03:00
c3f61e7c85 [#30] client: drop keepalive options
Node doesn't use any specific settings, these setting should be provided
by the caller.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-16 15:50:15 +03:00
1d691fed57 [#25] tracing: Fix panic on closed channel
Closed channel is also ready for communication, so select
statement can write to it.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-04-18 10:53:11 +03:00
3 changed files with 3 additions and 9 deletions

View file

@ -51,7 +51,6 @@ func NewGRPCStreamClientInterceptor() grpc.StreamClientInterceptor {
strWrp := newgRPCClientStream(str, desc, finished, done) strWrp := newgRPCClientStream(str, desc, finished, done)
go func() { go func() {
defer close(finished)
defer close(done) defer close(done)
defer span.End() defer span.End()

View file

@ -6,7 +6,6 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/keepalive"
) )
const ( const (
@ -31,7 +30,6 @@ type cfg struct {
const ( const (
defaultDialTimeout = 5 * time.Second defaultDialTimeout = 5 * time.Second
defaultKeepAliveTimeout = 5 * time.Second
defaultRWTimeout = 1 * time.Minute defaultRWTimeout = 1 * time.Minute
) )
@ -41,9 +39,6 @@ func (c *cfg) initDefault() {
c.grpcDialOpts = []grpc.DialOption{ c.grpcDialOpts = []grpc.DialOption{
grpc.WithBlock(), grpc.WithBlock(),
grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Timeout: defaultKeepAliveTimeout,
}),
} }
} }

View file

@ -2,7 +2,7 @@ package signature
import "sync" import "sync"
const poolSliceMaxSize = 64 * 1024 const poolSliceMaxSize = 128 * 1024
var buffersPool = sync.Pool{ var buffersPool = sync.Pool{
New: func() any { New: func() any {