Related Information Examples & Tutorials

Passive Lock Timeouts

Collect! synchronizes simultaneous data entry from multi- user users using a system of locking and unlocking records that is usually transparent to the operator. There are times when records are locked by other users and data cannot be processed until the locks are freed. The Passive Lock Timeouts feature allows Collect! to process repeat lock requests without user intervention. Like the automatic redialing feature on a phone, Collect! will keep on requesting a lock on the record until it is granted.

This is most useful for running large batch processes unattended. Passive Lock Timeouts eliminates any interruption requiring a user key press to continue. Instead, Collect! automatically retries the lock request until it succeeds and then carries on with the process being performed.

For System Administrators, there is added functionality of system logging with special codes to explain the nature of failed lock requests. When a user does choose to cancel a repeated lock request, System Administrators may examine the logs\syslog.txt for troubleshooting.

Requesting Lock

When a lock request times out because another user has a lock on the record, Collect! will display a "Requesting lock" message. Meanwhile, Collect! will keep attempting to lock the required records. The number of attempts is displayed at the bottom of the Collect! screen in the Status Bar. Collect! will automatically retry the request approximately every 2 seconds until the lock has been granted.

At any time during this process, the user may click on the "Requesting lock" message to take control. At that point, a "Pausing lock request" message will appear and Collect! will wait for the current lock request to succeed or fail. If it fails, a YES/NO dialog will appear prompting the user to CANCEL the lock request or keep on trying.

Top of page.

System Logging

If the user cancels the lock request, an entry will be written to the logs\syslog.txt file revealing the user and types of locks that were held preventing the lock request from succeeding.

Sample log entries:

2006/01/10 09:38:11 OWN 00002 WORKER1XP masterdb
nx_lock W I R debtor 4:0:28903 99
5 lock request currently unavailable (S_UNAVAIL)

2006/01/10 10:04:04 OWN 00001 WORKER2XP masterdb
wl_grplock R T R client 99
5 lock request currently unavailable (S_UNAVAIL)

2006/01/10 10:04:04 OWN 00001 WORKER2XP masterdb
wl_grplock W T S client_debtors 99
5 lock request currently unavailable (S_UNAVAIL)

Top of page.

Technical Details

The first part of each entry is a system stamp of Date, Time, Operator, Session, Workstation, and Device.

Example:

2006/01/10 09:38:11 OWN 00002 WORKER1XP masterdb

Then the actual data follows, with a 3 letter code following the nx_lock or wl_grplock text.

  • The first letter will be either W or R indicating a WRITE [W] or READ [R] lock attempt.
  • The second letter will be either an I or T indicating an INSTANCE [I[ or TABLE [T] lock.
  • The third letter will be an R or S indicating a RECORD [R] or SET [S] lock.

Following the 3 letter code, is the name of the Set or Record that was being locked. If the lock was an Instance lock, following the name will be the database address of the specific record. The last information in this line is the operator ID that was holding the lock.

Entry 1:

nx_lock W I R debtor 4:0:28903 99
"W I R debtor 4:0:28903 99" means that a Record Instance Write Lock on Debtor DBA: 4:0:28903 failed because user 99 had it locked and the user canceled the attempt.

Entry 2:

wl_grplock R T R client 99
"R T R client 99" means that a Record Table Read Lock on clients failed because user 99 had it locked.

Entry 3:

wl_grplock W T S client_debtors 99
"W T S client_debtors 99" means that a Set Table Write lock on the client_debtors set failed because of user 99.

The last part of the each entry is the actual RDM Server error code and its description.

Example:

5 lock request currently unavailable (S_UNAVAIL)

This means System Db Error -5 which is "Lock request currently unavailable."

Please refer to System Db Error Index for more information about error codes.

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org