Skip to content

Commit 98a7c8b

Browse files
committed
Fix new types
Signed-off-by: Mohamed Hamza <[email protected]>
1 parent 475408c commit 98a7c8b

File tree

5 files changed

+37
-39
lines changed

5 files changed

+37
-39
lines changed

go/vt/vtexplain/vtexplain_vtgate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (vte *VTExplain) initVtgateExecutor(ctx context.Context, ts *topo.Server, v
8686
}
8787

8888
func (vte *VTExplain) newFakeResolver(ctx context.Context, opts *Options, serv srvtopo.Server, cell string) *vtgate.Resolver {
89-
gw := vtgate.NewTabletGateway(ctx, vte.healthCheck, serv, cell)
89+
gw, _ := vtgate.NewTabletGateway(ctx, vte.healthCheck, serv, cell)
9090
_ = gw.WaitForTablets(ctx, []topodatapb.TabletType{topodatapb.TabletType_REPLICA})
9191

9292
txMode := vtgatepb.TransactionMode_MULTI

go/vt/vtexplain/vtexplain_vttablet.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (vte *VTExplain) newTablet(ctx context.Context, env *vtenv.Environment, opt
127127

128128
tablet.QueryService = queryservice.Wrap(
129129
nil,
130-
func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService, name string, inTransaction bool, inner func(context.Context, *querypb.Target, queryservice.QueryService) (bool, error)) error {
130+
func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService, name string, opts *queryservice.WrapOpts, inner func(context.Context, *querypb.Target, queryservice.QueryService) (bool, error)) error {
131131
return fmt.Errorf("explainTablet does not implement %s", name)
132132
},
133133
)
@@ -408,7 +408,6 @@ func newTabletEnvironment(ddls []sqlparser.DDLStatement, opts *Options, collatio
408408
Rows: [][]sqltypes.Value{},
409409
},
410410
"create table if not exists `_vt`.dt_participant(\n dtid varbinary(512),\n\tid bigint,\n\tkeyspace varchar(256),\n\tshard varchar(256),\n primary key(dtid, id)\n\t) engine=InnoDB": {
411-
412411
Fields: []*querypb.Field{{
413412
Type: sqltypes.Uint64,
414413
Charset: collations.CollationBinaryID,

go/vt/vtgate/tabletgateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func (gw *TabletGateway) getBalancerTablet(target *querypb.Target, tablets []*di
460460

461461
// withShardError adds shard information to errors returned from the inner QueryService.
462462
func (gw *TabletGateway) withShardError(ctx context.Context, target *querypb.Target, conn queryservice.QueryService,
463-
_ string, _ bool, inner func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService) (bool, error),
463+
_ string, _ *queryservice.WrapOpts, inner func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService) (bool, error),
464464
) error {
465465
_, err := inner(ctx, target, conn)
466466
return NewShardError(err, target)

go/vt/vttablet/queryservice/fakes/error_query_service.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ limitations under the License.
1717
package fakes
1818

1919
import (
20-
"fmt"
21-
2220
"context"
21+
"fmt"
2322

2423
"vitess.io/vitess/go/vt/vttablet/queryservice"
2524

@@ -29,7 +28,7 @@ import (
2928
// ErrorQueryService is an object that returns an error for all methods.
3029
var ErrorQueryService = queryservice.Wrap(
3130
nil,
32-
func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService, name string, inTransaction bool, inner func(context.Context, *querypb.Target, queryservice.QueryService) (bool, error)) error {
31+
func(ctx context.Context, target *querypb.Target, conn queryservice.QueryService, name string, opts *queryservice.WrapOpts, inner func(context.Context, *querypb.Target, queryservice.QueryService) (bool, error)) error {
3332
return fmt.Errorf("ErrorQueryService does not implement any method")
3433
},
3534
)

0 commit comments

Comments
 (0)