Opened 8 years ago
Closed 8 years ago
#1500 closed defect (wontfix)
petascope should set up rasql connection once
Reported by: | Dimitar Misev | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | critical | Milestone: | 9.4 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Peter Baumann | |
Complexity: | Medium |
Description
As ticket #1499 demonstrates (especially notice my comment with the measurements, setting up the connection to rasql is pretty expensive (up to 2 seconds in total!). Starting and committing transactions is fast otherwise.
Petascope seems to repeat the setup for every query (RasUtil.executeRasqlQuery), this needs be fixed as soon as possible so that it's done only once when petascope is started.
Attachments (2)
Change History (8)
comment:1 by , 8 years ago
follow-up: 3 comment:2 by , 8 years ago
Note: when fixing this, please test if petascope still works as expected after restarting rasdaman.
comment:3 by , 8 years ago
Replying to dmisev:
Note: when fixing this, please test if petascope still works as expected after restarting rasdaman.
When I set static RasImplemenetation from Petascope Initialization (singleton) and restart rasdaman, it will have this error (so seem like to support this optimization, must restart Petascope as well).
Caused by: java.lang.RuntimeException: The client with client ID c8d616f3-3f8b-4fdb-9c76-0b1661ff5bb7 does not exist.
at org.rasdaman.rasnet.util.GrpcUtils.convertStatusToRuntimeException(GrpcUtils.java:57)
comment:4 by , 8 years ago
You should not need to restart petascope in this case, but catch the exception and reinitialize the connection?
comment:5 by , 8 years ago
Update: Actually, this method rasqlImplementation.setUserIdentification(ConfigManager?.RASDAMAN_USER, ConfigManager?.RASDAMAN_PASS);
also initialize a serverID to rasqlImplementation object each time (it seems like it check if a Rasserver with UUID is free then it open connection to this server and it throw error if using only 1 server UUID from Petascope initialization).
Ah I see, it's unexpected that a method setUserIdentification would do that! Hmm so this seems a bit more involved than I thought then.
by , 8 years ago
Attachment: | 0001-ticket-1500-Petascope-using-one-RasqlImplementation.patch added |
---|
patch which tried to test
comment:6 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
So I had a few tests and dicussed with Dimitar, the results for 10000 requests before the patch and after the patch (restart rasdaman, rebuild petascope each time) is:
with my patch
real 11m24.681s
and without my patch
real 11m16.243s
as the bottleneck is the need to make a new connection to rasserver if client-id is not the same and catch exception could lead to delay the time in reality so we consider to close this ticket now.
Most time is spent on