Setting the -rereadnolock parameter
- Last Updated: January 27, 2016
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The -rereadnolock parameter indicates to the AVM
that when an attempt is made to find a record NO-LOCK,
even if the record is already in a buffer, then the record should be reread from the
database. Use it as an ABL client startup parameter to resolve client-server currency
conflicts. Use it by setting the sessionStartupParam
property in the PAS for OpenEdge openedge.properties file
for the appropriate server to resolve server-server currency conflicts.
There are several things to keep in mind when using the -rereadnolock startup
parameter
- The
-rereadnolockparameter has no affect on records that are being retrieved viaRECIDorROWID. In that case, the AVM will not reread the record. It will use the copy of the record already stored in the buffer. If the most current version of the record is needed, then use theRELEASEstatement on all buffers that contain a copy of the record before reading the record, or useFIND CURRENTorGET CURRENTstatement to reread the record. - The
-rereadnolockparameter has no affect on the behavior of the query cache used for aNO-LOCKquery as specified via theCACHEn phrase of theDEFINE QUERYstatement. If the record is in the cache, it will not be reread regardless of whether-rereadnolockis set. To force the record to always be reread setCACHE 0. Note that setting the cache size to zero (0) may significantly degrade performance if the database is being accessed across a network. Only set the cache size to zero (0) when it is critical to retrieve the most current version of a record. - The
-rereadnolockparameter has no affect on the behavior of the prefetch cache that is used by default when retrieving recordsNO-LOCKacross the network. By default, when executing aCAN-FINDfunction, or theFIND,FOR, orOPEN QUERYstatements on a database which is being accessed across a network, the AVM fetches several records at a time, and stores those records within a prefetch cache. the AVM will only sends a request to the database server to fetch more records if the requested record is not contained within the current prefetch cache. If the record is in this cache, a new copy of that record will not be read even if-rereadnolockis set. To eliminate this cache so that the most current version of the record is always read use theNO-PREFETCHkeyword in the appropriate statements. Note that using theNO-PREFETCHkeyword may significantly degrade performance. Only setNO-PREFETCHwhen it is critical to retrieve the most current version of a record.