You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the KV client only provides synchronous API for sending requests. If a query needs to issue multiple requests concurrently, it inevitably has to create a new goroutine for each concurrent procedure. A typical scenario is batch-get, which groups keys into batches based on regions. When the number of batches exceeds one, a worker goroutine is created for each batch to send KV requests.
We aim to reduce the number of goroutines while still allowing requests to be issued concurrently as before. To achieve this, we need to introduce async API. In fact, the internal batch client processes requests and responses asynchronously through send loop and recv loop. It's not difficult to implement an async method for RPCClient, but rewriting upper layer in an async way require a significant amount of work. This issue tries to describe the brief work plan, it's also used to track related PRs.
Here is the related task breakdown
Define and implement core interfaces (eg. executor, callback) that will be used in async API.
Currently, the KV client only provides synchronous API for sending requests. If a query needs to issue multiple requests concurrently, it inevitably has to create a new goroutine for each concurrent procedure. A typical scenario is batch-get, which groups keys into batches based on regions. When the number of batches exceeds one, a worker goroutine is created for each batch to send KV requests.
We aim to reduce the number of goroutines while still allowing requests to be issued concurrently as before. To achieve this, we need to introduce async API. In fact, the internal batch client processes requests and responses asynchronously through send loop and recv loop. It's not difficult to implement an async method for
RPCClient
, but rewriting upper layer in an async way require a significant amount of work. This issue tries to describe the brief work plan, it's also used to track related PRs.Here is the related task breakdown
SendRequestAsync
forRPCClient
and its upper wrappers (eg. collapse client, interceptor client).RegionRequestSender
to maximize code reuse when implementing the asynchronous interface.SendReqAsync
forRegionRequestSender
.KVSnapshot
and allow batch-get to execute asynchronously.The text was updated successfully, but these errors were encountered: