You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Either I missed something, either there is possibly a behavioural bug.
I'm trying to run 5 simultaneous queries with QueryPipeline just like like below. The thing is when I run queries independently, it works but for faster speed, I need it to parallelised them.
I tried several options like go routine, with one connection and it doesn't work, I tried with the pool connection and it was still really slow because needed to create multiple connections and then I tried with Query Pipeline, the thing is when the result is empty, it just doesn't end (Like it's waiting for timeout of 1min). Plus it doesn't show the result of the queries that are after.
Here the example:
I have 4 queries :
query_1 that returns 7, query_2 that returns 257, query_3 that returns nothing (no match found), query_4 that returns nothing (no match found)
pipeline, err := con.PreparePipeline(
query_1,
query_2,
query_3,
query_4,
)
handleError(err)
pipelineRows, err := pipeline.QueryPipeline(nil, nil, nil, nil, nil)
result, _, _, err := pipelineRows.NextPipeline()
fmt.Println("result 1")
spew.Dump(result) // <= gives 7 so okay
_, _, pipelineRows, err = pipelineRows.NextPipeline()
result, _, _, err = pipelineRows.NextPipeline()
fmt.Println("2 res")
spew.Dump(result) // <= gives 257 so okay
_, _, pipelineRows, err = pipelineRows.NextPipeline()
result, _, _, err = pipelineRows.NextPipeline()
fmt.Println("3 res")
spew.Dump(result) // <= gives nothing so okay
_, _, pipelineRows, err = pipelineRows.NextPipeline() // looks like it's stuck here because it was empty so can't have the result of the last query
result, _, _, err = pipelineRows.NextPipeline() // or stuck here maybe ?
fmt.Println("4 res")
spew.Dump(result) // <= can't have the result
_, _, pipelineRows, err = pipelineRows.NextPipeline()
So, do you have any insight on how to parallelize queries that way please ?
Or help me get the results of the last queries please ?
P.S. I checked every err and they're all empty
Also if the result of the 1st query is empty, I don't have the result of the second and others that are right after.
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
Either I missed something, either there is possibly a behavioural bug.
I'm trying to run 5 simultaneous queries with
QueryPipeline
just like like below. The thing is when I run queries independently, it works but for faster speed, I need it to parallelised them.I tried several options like go routine, with one connection and it doesn't work, I tried with the pool connection and it was still really slow because needed to create multiple connections and then I tried with Query Pipeline, the thing is when the result is empty, it just doesn't end (Like it's waiting for timeout of 1min). Plus it doesn't show the result of the queries that are after.
Here the example:
I have 4 queries :
query_1
that returns 7,query_2
that returns 257,query_3
that returns nothing (no match found),query_4
that returns nothing (no match found)So, do you have any insight on how to parallelize queries that way please ?
Or help me get the results of the last queries please ?
P.S. I checked every err and they're all empty
Also if the result of the 1st query is empty, I don't have the result of the second and others that are right after.
Thanks
The text was updated successfully, but these errors were encountered: