Kbase 21033: ORACLE DataServer: Optimistic Mode Hangs When Record Locked
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/06/2009 |
|
Status: Verified
SYMPTOM(s):
Progress session hangs when a program tries to update a record using the DataServer optimistic feature.
FACT(s) (Environment):
Progress 9.x
Oracle DataServer
All Supported Operating Systems
OpenEdge 10.x
CAUSE:
The ORACLE DataServer supports the use of field lists on queries that include the NO-LOCK option. It will bring only the fields specified in the query to client. (The DataServer will bring the whole record if the query does not have NO-LOCK specified).
The optimistic mode enables the use of field lists when an application needs to update a record. Therefore, try writing queries with field lists that retrieve records NO-LOCK and still update data on those records by using the optimistic update feature.
This feature is enabled by specifying -Dsrv optimistic at the ORACLE database connection.
The NO-LOCK option, along with field lists, ensures that the DataServer does not have to refetch the records to the client, thus improving performance. When the record is changed, an UPDATE is sent to the ORACLE database.
If the application is trying to update a record that is already locked, the session will hang until the record is released or until the lock time out expires (see -lkwtmo). This is an ORACLE limitation since there is no NO-WAIT option for UPDATE statements. NOTE: You will NOT get a message informing you that the record is in use by another process.
FIX:
When using the optimistic feature, an application will need to handle such situations. Make sure to test if the record is currently LOCKED.