@@ -248,8 +248,8 @@ func (h *Hub) Abort() {
248248 for _ , iter := range h .runningIterators {
249249 // read the scan metadata from the iterator and add to our stack
250250 h .AddScanMetadata (iter )
251- // abort the iterator
252- iter .Abort ()
251+ // close the iterator
252+ iter .Close ()
253253 // remove it from the saved list of iterators
254254 h .RemoveIterator (iter )
255255 }
@@ -633,11 +633,12 @@ func (h *Hub) startScan(iterator *scanIterator, queryContext *proto.QueryContext
633633
634634 table := iterator .table
635635 connectionPlugin := iterator .connectionPlugin
636+ callId := grpc .BuildCallId ()
636637
637638 req := & proto.ExecuteRequest {
638639 Table : table ,
639640 QueryContext : queryContext ,
640- CallId : iterator . callId ,
641+ CallId : callId ,
641642 TraceContext : grpc .CreateCarrierFromContext (traceCtx .Ctx ),
642643 ExecuteConnectionData : make (map [string ]* proto.ExecuteConnectionData ),
643644 }
@@ -654,12 +655,12 @@ func (h *Hub) startScan(iterator *scanIterator, queryContext *proto.QueryContext
654655 req .ExecuteConnectionData [connectionName ] = data
655656 }
656657
657- log .Printf ("[INFO] StartScan for table: %s, callId %s, cache enabled: %v, iterator %p" , table , iterator . callId , req .CacheEnabled , iterator )
658+ log .Printf ("[INFO] StartScan for table: %s, callId %s, cache enabled: %v, iterator %p" , table , callId , req .CacheEnabled , iterator )
658659 stream , ctx , cancel , err := connectionPlugin .PluginClient .Execute (req )
659660 // format GRPC errors and ignore not implemented errors for backwards compatibility
660661 err = grpc .HandleGrpcError (err , connectionPlugin .PluginName , "Execute" )
661662 if err != nil {
662- log .Printf ("[WARN] startScan: plugin Execute function callId: %s returned error: %v\n " , iterator . callId , err )
663+ log .Printf ("[WARN] startScan: plugin Execute function callId: %s returned error: %v\n " , callId , err )
663664 iterator .setError (err )
664665 return err
665666 }
0 commit comments