-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible concurrency issue in query construction #554
Comments
I think this is a symptom of the same problem but it doesn't get as far as making the query:
Will continue trying to provoke the same failure mode however. What I did notice is that immediately prior (or perhaps simultaneously,) to this is that it ran:
in another thread (this is just the validating the session on refresh.) |
Right, finally got the original error:
It somehow has mashed up the "select list" from the query that was being run in another thread which is:
Which itself was made by :
The only way I can see this happening is that somehow the ResultSeq is being shared, but I can't see how. |
Thanks... I'll also try to find that out... but it will be hard... |
Yeah it's also tricky to reproduce because it is very sensitive to the timings. The application accepts a multi-file upload and in the background (having returned a 204 response,) processes each in turn, calling the So I think what needs to happen to trigger this is that it moves on to processing the next uploaded file while the query of Having typed it out like that it does occur to me that the design could be improved (that the upload triggers a refresh of the view in the background and the client is notified to redraw the chart when the refresh completes,) but I'm not sure this would remedy the problem because it would still have the timing dependency. |
I'm now also hitting this with the rakudo CI bot during boot up of the application. |
Could you share a snippet where we could see that happening? Thanks |
I'm getting:
This is very intermittent.
The thing is that the
upload-exists
method has nothing to do with the tablestats_view_refresh
, being defined as:And usually would make SQL like:
It looks like there is possibly some data that is shared between threads which results in the wrong query being generated.
I'll try and replicate with debugging on, but I might also do a PR such that the query gets passed to the
map-exception
so that e.g. theX::Red::Driver::Mapped::UnknownError
can include it.The text was updated successfully, but these errors were encountered: