Red icon indicating copy to clipboard operation
Red copied to clipboard

Translation of AST::Select is not thread-safe.

Open vrurg opened this issue 6 years ago • 2 comments

Parallelizing of queries to different tables sometimes end up in PostgreSQL complaining on wrong query syntax. In particular, a SELECT would refer to table it doesn't fetch from.

Took me some time to track down the cause. It is described in rakudo/rakudo#2882. Red is applying an anonymous role to a column object in Red::Driver::CommonSQL where the failure happens.

It seems like I have a solution and would try to provide a PR ASAP.

vrurg avatar May 08 '19 23:05 vrurg

There're more thread-related issues are lurking in the code. I'm trying to find out why out of sudden > and gt operators stop working. Most likely some other are broken too.

<Strike>Running tests with prove6 also reveal few more issues. Pardon me, forgot about prove6 -l switch.

vrurg avatar May 10 '19 00:05 vrurg

I don't think I'd have time to get this investigated. Fell free to close this issue if you think it's polluting the tracker.

vrurg avatar Sep 12 '21 21:09 vrurg