Currently GetMRSplits creates one split per shard. This change allows
for further splitting within a shard for better parallelism in mappers.
Splits within a shard are created by appending primary key range clauses
to the shard level query.
Changes:
Added SplitQuery RPC to VtTablet
Modified GetMRSplits to accept SQL queries instead of Table and columns
GetMRSplits forwards the query to tablet for splitting via scatterConn
Unit tests
The ErrFunc cannot be reliably used to check for rpc
send errors because the sender goroutine can race against
the call to set the error to a streaming error.
So, we're changing the function to return an explicit
error to indicate if the rpc has failed.
There is a deeper problem with rpcplus where it doesn't
have the same behavior. The rpcplus API returns a channel
immediately, and sets the error variable later if the send
failed. We need to change this behavior in the go client API
before we can benefit from this.
- can now read a table in multiple chunks based on primary key ranges.
- added parameters for all interesting values.
- limit source concurrency with a semaphore.