Opened 9 years ago
Closed 6 years ago
#1215 closed defect (fixed)
Concurrent queries on client side
Reported by: | Dimitar Misev | Owned by: | Dimitar Misev |
---|---|---|---|
Priority: | major | Milestone: | 9.7 |
Component: | rasodmg | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Peter Baumann | |
Complexity: | Medium |
Description
.. seem to be shipped to the same rasserver. To reproduce you can use the attached code
cd applications/rasql tar xzf test_concurrent_client.tar.gz make query ./query
It sends the same query from two threads, and in the server log I see:
[INFO] - 05/02/2016 12:57:36.241746: Request: 'select avg_cells(c) from test_rgb2 as c'... [INFO] - 05/02/2016 12:57:36.241782: Request: 'select avg_cells(c) from test_rgb2 as c'... [INFO] - 05/02/2016 12:57:36.241800: parsing... [INFO] - 05/02/2016 12:57:36.241813: parsing... Error number: 300 Token: ( Line: 1 Column: 19 [INFO] - 05/02/2016 12:57:36.241908: rasserver terminated.
Attachments (2)
Change History (6)
by , 9 years ago
Attachment: | test_concurrent_client.tar.gz added |
---|
comment:1 by , 9 years ago
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 6 years ago
Attachment: | 0001-ticket-1215-fix-thread-safety-in-rasodmg.patch added |
---|
comment:3 by , 6 years ago
Cc: | added; removed |
---|---|
Component: | rasnet → rasodmg |
Milestone: | 10.0 → 9.7 |
Owner: | changed from | to
Patch is under review.
You can see the API changes in rasodmg that fixing this requires in this documentation patch.
The issue in more detail: rasodmg is not thread-safe because it uses global r_Database
and r_Transaction
objects, which was further propagated in clientcomm. This patch removes the global objects; as a consequence, some rasodmg API change a bit with an additional parameter (the r_Transaction
object, which in turn contains the r_Database
object).
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed finally, there are optional arguments in several places where the transaction object should be specified if thread-safety is needed. I will update the documentation as well to add notice about this.
I do not think this is related to rasnet. It is related to raslib not being very thread safe.