


This variable selects which locking method Vision uses to control simultaneous
access to indexed files. It affects only the Vision file system, and only
files directly accessed by the runtime (it does not apply to files accessed via
AcuServer).
The default setting of "0" causes Vision to lock the first byte of the file
for every access to the file (both reads and updates). This ensures that the
process is not interfered with by another process. This locking method is always
used by Vision Version 2 files.
Setting this variable to "1" (one) causes Vision to lock the first byte of the
file for all operations except random READs or READ NEXTs. These two
operations proceed without the lock. Instead they perform some additional reads of the
file, to ensure that they get consistent results. If they get inconsistent
results, they are retried, this time locking the first byte as other operations
do. This locking method is available only for Vision Version 3 and Version 4
files.
Note that this variable must have the same setting for all the runtimes
accessing a file, whether they are reading or writing to it. For example, if a
runtime set with V_LOCK_METHOD=1 is reading from a file, any runtimes that are
writing to that same file must also have V_LOCK_METHOD set to 1.
Lock method "1" can produce better performance on some machines. These
machines fall into two categories:
If you are experiencing poor performance on Vision version 3 or 4 files,
setting V_LOCK_METHOD to "1" may help.
Setting this variable to "2" (two) enables "asynchronous reads" of Vision
files. This can reduce the number of file locks required to perform READs and READ
NEXTs. V_LOCK_METHOD=2 works only for Vision 4 files.
If any process reading a particular file is using V_LOCK_METHOD=2, all other
processes updating that file must be Version 5.0.0 or greater. This is because
Version 5.0.0 contains changes that affect the way Vision updates the tree
structure of its files. This requirement is not enforced by Vision, however, so it is important for
users to pay careful attention to the versions of programs accessing the files to
avoid receiving erroneous data.