зеркало из https://github.com/github/vitess-gh.git
Post-merge fixes.
This commit is contained in:
Родитель
97625ca7a7
Коммит
31428b60d7
|
@ -189,7 +189,7 @@ func sandboxDialer(context interface{}, endPoint topo.EndPoint, keyspace, shard
|
|||
return tconn, nil
|
||||
}
|
||||
|
||||
func mapTestConn(shard string, conn TabletConn) {
|
||||
func mapTestConn(shard string, conn tabletconn.TabletConn) {
|
||||
uid, err := getUidForShard(shard)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
|
||||
log "github.com/golang/glog"
|
||||
mproto "github.com/youtube/vitess/go/mysql/proto"
|
||||
"github.com/youtube/vitess/go/vt/key"
|
||||
"github.com/youtube/vitess/go/vt/vtgate/proto"
|
||||
)
|
||||
|
||||
|
@ -116,13 +117,13 @@ func (vtg *VTGate) mapKrToShardsForStreaming(streamQuery *proto.StreamQueryKeyRa
|
|||
// and one shard since it cannot merge-sort the results to guarantee ordering of
|
||||
// response which is needed for checkpointing. The api supports supplying multiple keyranges
|
||||
// to make it future proof.
|
||||
func (vtg *VTGate) StreamExecuteKeyRange(context *rpcproto.Context, streamQuery *proto.StreamQueryKeyRange, sendReply func(*proto.QueryResult) error) error {
|
||||
func (vtg *VTGate) StreamExecuteKeyRange(context interface{}, streamQuery *proto.StreamQueryKeyRange, sendReply func(*proto.QueryResult) error) error {
|
||||
shards, err := vtg.mapKrToShardsForStreaming(streamQuery)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err := vtg.scatterConn.StreamExecute(
|
||||
err = vtg.scatterConn.StreamExecute(
|
||||
context,
|
||||
streamQuery.Sql,
|
||||
streamQuery.BindVariables,
|
||||
|
|
|
@ -165,8 +165,8 @@ func TestVTGateStreamExecuteKeyRange(t *testing.T) {
|
|||
|
||||
// Test for error condition - multiple shards
|
||||
sq.KeyRange = "10-40"
|
||||
err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r interface{}) error {
|
||||
qrs = append(qrs, r.(*proto.QueryResult))
|
||||
err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r *proto.QueryResult) error {
|
||||
qrs = append(qrs, r)
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
|
@ -174,8 +174,8 @@ func TestVTGateStreamExecuteKeyRange(t *testing.T) {
|
|||
}
|
||||
// Test for error condition - multiple shards, non-partial keyspace
|
||||
sq.KeyRange = ""
|
||||
err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r interface{}) error {
|
||||
qrs = append(qrs, r.(*proto.QueryResult))
|
||||
err = RpcVTGate.StreamExecuteKeyRange(nil, &sq, func(r *proto.QueryResult) error {
|
||||
qrs = append(qrs, r)
|
||||
return nil
|
||||
})
|
||||
if err == nil {
|
||||
|
|
Загрузка…
Ссылка в новой задаче