Closed nurzhan-saktaganov closed 3 months ago
Since replicaset.conn.Do returns future, we can send a bunch of requests and wait for their responses in the same goroutine. No errgroup, channels and workers are needed. It can significantly simplify RouterMapCallRWImpl.
replicaset.conn.Do
future
RouterMapCallRWImpl
See the lua implementation as a reference: https://github.com/tarantool/vshard/blob/9fc976daa04d6435a258cac91d9d7cf3ddcdc5cc/vshard/router/init.lua#L803
PR to resolve this issue: #47
Since
replicaset.conn.Do
returnsfuture
, we can send a bunch of requests and wait for their responses in the same goroutine. No errgroup, channels and workers are needed. It can significantly simplifyRouterMapCallRWImpl
.See the lua implementation as a reference: https://github.com/tarantool/vshard/blob/9fc976daa04d6435a258cac91d9d7cf3ddcdc5cc/vshard/router/init.lua#L803