@@ -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 }
@@ -641,11 +641,12 @@ func (h *Hub) startScan(iterator *scanIterator, queryContext *proto.QueryContext
641641
642642 table := iterator .table
643643 connectionPlugin := iterator .connectionPlugin
644+ callId := grpc .BuildCallId ()
644645
645646 req := & proto.ExecuteRequest {
646647 Table : table ,
647648 QueryContext : queryContext ,
648- CallId : iterator . callId ,
649+ CallId : callId ,
649650 TraceContext : grpc .CreateCarrierFromContext (traceCtx .Ctx ),
650651 ExecuteConnectionData : make (map [string ]* proto.ExecuteConnectionData ),
651652 }
@@ -662,12 +663,12 @@ func (h *Hub) startScan(iterator *scanIterator, queryContext *proto.QueryContext
662663 req .ExecuteConnectionData [connectionName ] = data
663664 }
664665
665- log .Printf ("[INFO] StartScan for table: %s, callId %s, cache enabled: %v, iterator %p" , table , iterator . callId , req .CacheEnabled , iterator )
666+ log .Printf ("[INFO] StartScan for table: %s, callId %s, cache enabled: %v, iterator %p" , table , callId , req .CacheEnabled , iterator )
666667 stream , ctx , cancel , err := connectionPlugin .PluginClient .Execute (req )
667668 // format GRPC errors and ignore not implemented errors for backwards compatibility
668669 err = grpc .HandleGrpcError (err , connectionPlugin .PluginName , "Execute" )
669670 if err != nil {
670- log .Printf ("[WARN] startScan: plugin Execute function callId: %s returned error: %v\n " , iterator . callId , err )
671+ log .Printf ("[WARN] startScan: plugin Execute function callId: %s returned error: %v\n " , callId , err )
671672 iterator .setError (err )
672673 return err
673674 }
0 commit comments