(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol)
| 24975 | } |
| 24976 | |
| 24977 | func (p *iClientRPCServiceProcessorExecuteRawDataQuery) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { |
| 24978 | args := IClientRPCServiceExecuteRawDataQueryArgs{} |
| 24979 | var err2 error |
| 24980 | if err2 = args.Read(ctx, iprot); err2 != nil { |
| 24981 | iprot.ReadMessageEnd(ctx) |
| 24982 | x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) |
| 24983 | oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) |
| 24984 | x.Write(ctx, oprot) |
| 24985 | oprot.WriteMessageEnd(ctx) |
| 24986 | oprot.Flush(ctx) |
| 24987 | return false, thrift.WrapTException(err2) |
| 24988 | } |
| 24989 | iprot.ReadMessageEnd(ctx) |
| 24990 | |
| 24991 | tickerCancel := func() {} |
| 24992 | // Start a goroutine to do server side connectivity check. |
| 24993 | if thrift.ServerConnectivityCheckInterval > 0 { |
| 24994 | var cancel context.CancelFunc |
| 24995 | ctx, cancel = context.WithCancel(ctx) |
| 24996 | defer cancel() |
| 24997 | var tickerCtx context.Context |
| 24998 | tickerCtx, tickerCancel = context.WithCancel(context.Background()) |
| 24999 | defer tickerCancel() |
| 25000 | go func(ctx context.Context, cancel context.CancelFunc) { |
| 25001 | ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) |
| 25002 | defer ticker.Stop() |
| 25003 | for { |
| 25004 | select { |
| 25005 | case <-ctx.Done(): |
| 25006 | return |
| 25007 | case <-ticker.C: |
| 25008 | if !iprot.Transport().IsOpen() { |
| 25009 | cancel() |
| 25010 | return |
| 25011 | } |
| 25012 | } |
| 25013 | } |
| 25014 | }(tickerCtx, cancel) |
| 25015 | } |
| 25016 | |
| 25017 | result := IClientRPCServiceExecuteRawDataQueryResult{} |
| 25018 | var retval *TSExecuteStatementResp |
| 25019 | if retval, err2 = p.handler.ExecuteRawDataQuery(ctx, args.Req); err2 != nil { |
| 25020 | tickerCancel() |
| 25021 | if err2 == thrift.ErrAbandonRequest { |
| 25022 | return false, thrift.WrapTException(err2) |
| 25023 | } |
| 25024 | x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing executeRawDataQuery: " + err2.Error()) |
| 25025 | oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.EXCEPTION, seqId) |
| 25026 | x.Write(ctx, oprot) |
| 25027 | oprot.WriteMessageEnd(ctx) |
| 25028 | oprot.Flush(ctx) |
| 25029 | return true, thrift.WrapTException(err2) |
| 25030 | } else { |
| 25031 | result.Success = retval |
| 25032 | } |
| 25033 | tickerCancel() |
| 25034 | if err2 = oprot.WriteMessageBegin(ctx, "executeRawDataQuery", thrift.REPLY, seqId); err2 != nil { |
nothing calls this directly
no test coverage detected