Open
Description
The context usage:
go-vshard-router/replicaset.go
Line 168 in bdd3ef5
leads to creating a goroutine for each request. It's very expensive (especially in context.Background() case). A faster way is to rely on setting a timeout on the entire connection with tarantool.Opts.Timeout:
So there is should be something like (need to think about naming):
func (rs *Replicaset) CallAsyncWithTimeout(opts ReplicasetCallOpts, fnc string, args interface{}) *tarantool.Future {
I would suggest adapting the request logic from the Go connector in the v3 library. This logic with FooAsync, FooTyped, FooWithContext, FooWithoutContextAsync it only seems simple, but in fact it is hard to maintain all this stuff.
Metadata
Metadata
Assignees
Labels
No labels