Print Thread
ServerVersion is not thread safe?!?
#49540 09/11/14 03:24 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
We have just verified in a multithread environment (web application) that calling to TOracleSession.ServerVersion dosen't work;
I'm using ThreadSafe = True, but calling ServerVersion from different threads cause a crash.
Instead, if I execute a simple query like 'select from v$version' using TOracleQuery/TORacleDataset, it works fine.
Now we can modify our behavior with critical section or other stuff, but I ask to Allround if there are other method/propertys that can be not thread safe (we don't have source code) so we can check.

Thanks

Last edited by Alberto Pilat; 09/12/14 06:24 AM.
Re: ServerVersion is not thread safe?!?
Alberto Pilat #49545 09/12/14 09:44 AM
Joined: Aug 1999
Posts: 22,175
Member
Offline
Member
Joined: Aug 1999
Posts: 22,175
I can indeed see how there might be an issue. We'll fix it.

Methods and properties that might clash when used simultaneously for the same TOracleSession instance from different threads:
  • ServerVersion
  • SetPassword
  • SetTransaction
  • Savepoint
  • RollbackToSavepoint
  • Setting SQLTrace
  • Setting OptimizerGoal
  • Setting IsolationLevel
  • Getting AUDSID

Last edited by Marco Kalter; 09/12/14 09:52 AM.

Marco Kalter
Allround Automations
Re: ServerVersion is not thread safe?!?
Marco Kalter #49559 09/15/14 03:50 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
Thank you Marco: we not use the others meths/props you listed.
But I have some doubt about Savepoint and RollbackToSavepoint...pheraps are they used internally by TOracleDataSet or not?

Re: ServerVersion is not thread safe?!?
Alberto Pilat #49562 09/16/14 09:37 AM
Joined: Aug 1999
Posts: 22,175
Member
Offline
Member
Joined: Aug 1999
Posts: 22,175
Only if you are using TOracleDataSet.CachedUpdates.

I can send you a test version with a fix for this issue, so that you can verify. Just let me know your Delphi version and I will arrange it.


Marco Kalter
Allround Automations
Re: ServerVersion is not thread safe?!?
Marco Kalter #49567 09/17/14 07:27 AM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
Of course we use it!!!

When possible I'll test the fix as soon as possible:
Delphi XE4
DOA 4.1.3.5

my email: a.pilat@mondoedp.com

P.S. I also posted a question about applyupdates on 64 bit, if you can have a look...

Re: ServerVersion is not thread safe?!?
Alberto Pilat #49594 09/22/14 03:43 PM
Joined: Feb 2005
Posts: 49
A
Member
OP Offline
Member
A
Joined: Feb 2005
Posts: 49
Hi Marco,
please could you provide the test version you spoke about last week? Or let me know when it will be available so I can schedule my test?
Thanks

Re: ServerVersion is not thread safe?!?
Alberto Pilat #49596 09/23/14 09:19 AM
Joined: Aug 1999
Posts: 22,175
Member
Offline
Member
Joined: Aug 1999
Posts: 22,175
Yes, we'll have it available later this week.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.036s Queries: 15 (0.009s) Memory: 2.5221 MB (Peak: 3.0397 MB) Data Comp: Off Server Time: 2024-03-29 11:12:25 UTC
Valid HTML 5 and Valid CSS