Kbase P12159: How does -rereadnolock startup client parameter change record locking?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/20/2008 |
|
Status: Unverified
GOAL:
How does -rereadnolock startup client parameter change record locking?
FIX:
The -rereadnolock parameter is used to change the behavior of NO_LOCK record retrieval.
When a Progress client ( 4GL, AppServer, web-agent ) makes a request to find a record with NO-LOCK, it will not always get the newest copy of the record. If the record is already being used NO-LOCK by another 4GL buffer then the old copy usually remains in memory rather than replacing it with a new copy. This behavior is always desirable.
The basic mechanism that accounts for this behavior works as follows. Progress first fetches the record from the database. Progress then takes the ROWID of the record and compares it to the ROWIDs of records that are already in memory, in use by other 4GL buffers. If ROWID matches one of the records in memory, Progress usually discards the new one, instead of the older record. This does not happen when the new record contains more information than the old one, for example, when the new record has more fields because it was based on a different field list.
The -rereadnolock startup parameter causes Progress to discard the older record and replace it with the latest version.
-rereadnolock:
- affects the behavior of NO-LOCK record retrieval by FOR EACH of PRESELECT EACH
- affects the behavior of NO-LOCK FINDs except for retrieval by RECID or ROWID as described below.
- does not affect the behavior of NO-LOCK FINDs based on retrieval by RECID or ROWID. Progress immediately looks in memory for the record, and does not read a new record if there is a copy in memory.
- affects the behavior of retrieval on a NO-LOCK QUERY except for CACHEing and network PREFETCHing as described below.
- does not affect the behavior of a network PREFETCH cache. By default, OPEN QUERY across a network uses a prefetch buffer that may contain multiple records read-ahead by the server. This startup parameter does not cause the record to be re-read if it is in the cache. OPEN QUERY has a NO-PREFETCH option that eliminates this network cache.